Dockerfile: install criu from binary repo
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
a8a769f04f
commit
c8e6ad1adc
1 changed files with 8 additions and 19 deletions
27
Dockerfile
27
Dockerfile
|
@ -20,26 +20,15 @@ ENV GO111MODULE=off
|
||||||
|
|
||||||
FROM base AS criu
|
FROM base AS criu
|
||||||
ARG DEBIAN_FRONTEND
|
ARG DEBIAN_FRONTEND
|
||||||
# Install dependency packages specific to criu
|
ADD --chmod=0644 https://download.opensuse.org/repositories/devel:/tools:/criu/Debian_10/Release.key /etc/apt/trusted.gpg.d/criu.gpg.asc
|
||||||
|
# FIXME: temporarily doing a manual chmod as workaround for https://github.com/moby/buildkit/issues/2114
|
||||||
RUN --mount=type=cache,sharing=locked,id=moby-criu-aptlib,target=/var/lib/apt \
|
RUN --mount=type=cache,sharing=locked,id=moby-criu-aptlib,target=/var/lib/apt \
|
||||||
--mount=type=cache,sharing=locked,id=moby-criu-aptcache,target=/var/cache/apt \
|
--mount=type=cache,sharing=locked,id=moby-criu-aptcache,target=/var/cache/apt \
|
||||||
apt-get update && apt-get install -y --no-install-recommends \
|
chmod 0644 /etc/apt/trusted.gpg.d/criu.gpg.asc \
|
||||||
libcap-dev \
|
&& echo 'deb https://download.opensuse.org/repositories/devel:/tools:/criu/Debian_10/ /' > /etc/apt/sources.list.d/criu.list \
|
||||||
libnet-dev \
|
&& apt-get update \
|
||||||
libnl-3-dev \
|
&& apt-get install -y --no-install-recommends criu \
|
||||||
libprotobuf-c-dev \
|
&& install -D /usr/sbin/criu /build/criu
|
||||||
libprotobuf-dev \
|
|
||||||
protobuf-c-compiler \
|
|
||||||
protobuf-compiler \
|
|
||||||
python-protobuf
|
|
||||||
|
|
||||||
# Install CRIU for checkpoint/restore support
|
|
||||||
ARG CRIU_VERSION=3.14
|
|
||||||
RUN mkdir -p /usr/src/criu \
|
|
||||||
&& curl -sSL https://github.com/checkpoint-restore/criu/archive/v${CRIU_VERSION}.tar.gz | tar -C /usr/src/criu/ -xz --strip-components=1 \
|
|
||||||
&& cd /usr/src/criu \
|
|
||||||
&& make \
|
|
||||||
&& make PREFIX=/build/ install-criu
|
|
||||||
|
|
||||||
FROM base AS registry
|
FROM base AS registry
|
||||||
WORKDIR /go/src/github.com/docker/distribution
|
WORKDIR /go/src/github.com/docker/distribution
|
||||||
|
@ -309,7 +298,7 @@ COPY --from=swagger /build/ /usr/local/bin/
|
||||||
COPY --from=tomll /build/ /usr/local/bin/
|
COPY --from=tomll /build/ /usr/local/bin/
|
||||||
COPY --from=tini /build/ /usr/local/bin/
|
COPY --from=tini /build/ /usr/local/bin/
|
||||||
COPY --from=registry /build/ /usr/local/bin/
|
COPY --from=registry /build/ /usr/local/bin/
|
||||||
COPY --from=criu /build/ /usr/local/
|
COPY --from=criu /build/ /usr/local/bin/
|
||||||
COPY --from=vndr /build/ /usr/local/bin/
|
COPY --from=vndr /build/ /usr/local/bin/
|
||||||
COPY --from=gotestsum /build/ /usr/local/bin/
|
COPY --from=gotestsum /build/ /usr/local/bin/
|
||||||
COPY --from=golangci_lint /build/ /usr/local/bin/
|
COPY --from=golangci_lint /build/ /usr/local/bin/
|
||||||
|
|
Loading…
Reference in a new issue