Skip to content

Commit

Permalink
Merge pull request opencontainers#2691 from kolyshkin/dont-compile-criu
Browse files Browse the repository at this point in the history
Dockerfile: use binary criu release; update some ci deps
  • Loading branch information
Mrunal Patel authored Dec 4, 2020
2 parents 8518317 + be56333 commit 166068a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 35 deletions.
44 changes: 12 additions & 32 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
ARG GO_VERSION=1.15
ARG BATS_VERSION=v1.2.0
ARG CRIU_VERSION=v3.15
ARG BATS_VERSION=v1.2.1
ARG UMOCI_VERSION=v0.4.6

FROM golang:${GO_VERSION}-buster
ARG DEBIAN_FRONTEND=noninteractive

RUN dpkg --add-architecture armel \
RUN echo 'deb https://download.opensuse.org/repositories/devel:/tools:/criu/Debian_10/ /' > /etc/apt/sources.list.d/criu.list \
&& wget -nv https://download.opensuse.org/repositories/devel:/tools:/criu/Debian_10/Release.key -O- | apt-key add - \
&& echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/ /' > /etc/apt/sources.list.d/skopeo.list \
&& wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/Debian_10/Release.key -O- | apt-key add - \
&& dpkg --add-architecture armel \
&& dpkg --add-architecture armhf \
&& dpkg --add-architecture arm64 \
&& dpkg --add-architecture ppc64el \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
criu \
crossbuild-essential-arm64 \
crossbuild-essential-armel \
crossbuild-essential-armhf \
Expand All @@ -21,26 +26,19 @@ RUN dpkg --add-architecture armel \
iptables \
jq \
kmod \
libaio-dev \
libcap-dev \
libnet-dev \
libnl-3-dev \
libprotobuf-c-dev \
libprotobuf-dev \
libseccomp-dev \
libseccomp-dev:arm64 \
libseccomp-dev:armel \
libseccomp-dev:armhf \
libseccomp-dev:ppc64el \
libseccomp2 \
pkg-config \
protobuf-c-compiler \
protobuf-compiler \
python-minimal \
skopeo \
sudo \
uidmap \
&& apt-get clean \
&& rm -rf /var/cache/apt /var/lib/apt/lists/*;
&& rm -rf /var/cache/apt /var/lib/apt/lists/* /etc/apt/sources.list.d/*.list

# Add a dummy user for the rootless integration tests. While runC does
# not require an entry in /etc/passwd to operate, one of the tests uses
Expand All @@ -57,27 +55,9 @@ RUN cd /tmp \
&& ./install.sh /usr/local \
&& rm -rf /tmp/bats-core

# install criu
ARG CRIU_VERSION
RUN mkdir -p /usr/src/criu \
&& curl -fsSL https://github.com/checkpoint-restore/criu/archive/${CRIU_VERSION}.tar.gz | tar -C /usr/src/criu/ -xz --strip-components=1 \
&& cd /usr/src/criu \
&& echo 1 > .gitid \
&& make -j $(nproc) install-criu \
&& cd - \
&& rm -rf /usr/src/criu

# install skopeo
RUN echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list \
&& wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/Debian_10/Release.key -O- | sudo apt-key add - \
&& apt-get update \
&& apt-get install -y --no-install-recommends skopeo \
&& rm -rf /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list \
&& apt-get clean \
&& rm -rf /var/cache/apt /var/lib/apt/lists/*;

# install umoci
RUN curl -o /usr/local/bin/umoci -fsSL https://github.com/opencontainers/umoci/releases/download/v0.4.5/umoci.amd64 \
ARG UMOCI_VERSION
RUN curl -o /usr/local/bin/umoci -fsSL https://github.com/opencontainers/umoci/releases/download/${UMOCI_VERSION}/umoci.amd64 \
&& chmod +x /usr/local/bin/umoci

COPY script/tmpmount /
Expand Down
5 changes: 3 additions & 2 deletions Vagrantfile.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ Vagrant.configure("2") do |config|
# configuration
GO_VERSION="1.15"
BATS_VERSION="v1.2.0"
BATS_VERSION="v1.2.1"
UMOCI_VERSION="v0.4.6"
# install yum packages
yum install -y -q epel-release
Expand All @@ -28,7 +29,7 @@ Vagrant.configure("2") do |config|
curl -fsSL "https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz" | tar Cxz /usr/local
# Install umoci
curl -o /usr/local/bin/umoci -fsSL https://github.com/opencontainers/umoci/releases/download/v0.4.5/umoci.amd64
curl -o /usr/local/bin/umoci -fsSL https://github.com/opencontainers/umoci/releases/download/${UMOCI_VERSION}/umoci.amd64
chmod +x /usr/local/bin/umoci
# install bats
Expand Down
3 changes: 2 additions & 1 deletion Vagrantfile.fedora33
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ EOF
chown -R rootless.rootless /home/rootless
# Install umoci
curl -o /usr/local/bin/umoci -fsSL https://github.com/opencontainers/umoci/releases/download/v0.4.5/umoci.amd64
UMOCI_VERSION=v0.4.6
curl -o /usr/local/bin/umoci -fsSL https://github.com/opencontainers/umoci/releases/download/${UMOCI_VERSION}/umoci.amd64
chmod +x /usr/local/bin/umoci
# Add busybox for libcontainer/integration tests
Expand Down

0 comments on commit 166068a

Please sign in to comment.