diff --git a/.travis.yml b/.travis.yml index 5c2928df25c..ada62e75650 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,19 +1,19 @@ dist: bionic language: go go: - - 1.11.x - - 1.12.x + - 1.13.x + - 1.14.x - tip matrix: include: - - go: 1.12.x + - go: 1.13.x env: - RUNC_USE_SYSTEMD=1 script: - make BUILDTAGS="${BUILDTAGS}" all - sudo PATH="$PATH" make localintegration RUNC_USE_SYSTEMD=1 - - go: 1.12.x + - go: 1.13.x env: - VIRTUALBOX_VERSION=6.0 - VAGRANT_VERSION=2.2.6 diff --git a/Dockerfile b/Dockerfile index 5c654705e75..c849160730e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,34 +1,47 @@ -FROM golang:1.12-stretch +ARG GO_VERSION=1.13.8 +ARG BATS_VERSION=03608115df2071fff4eaaff1605768c275e5f81f +ARG CRIU_VERSION=v3.12 +ARG DEBIAN_FRONTEND=noninteractive + +FROM golang:${GO_VERSION}-buster +ARG DEBIAN_FRONTEND RUN dpkg --add-architecture armel \ && dpkg --add-architecture armhf \ && dpkg --add-architecture arm64 \ - && dpkg --add-architecture ppc64el \ - && apt-get update && apt-get install -y \ - build-essential \ - curl \ - sudo \ - gawk \ - iptables \ - jq \ - pkg-config \ - libaio-dev \ - libcap-dev \ - libprotobuf-dev \ - libprotobuf-c0-dev \ - libnl-3-dev \ - libnet-dev \ - libseccomp2 \ - libseccomp-dev \ - protobuf-c-compiler \ - protobuf-compiler \ - python-minimal \ - uidmap \ - kmod \ - crossbuild-essential-armel crossbuild-essential-armhf crossbuild-essential-arm64 crossbuild-essential-ppc64el \ - libseccomp-dev:armel libseccomp-dev:armhf libseccomp-dev:arm64 libseccomp-dev:ppc64el \ - --no-install-recommends \ - && apt-get clean + && dpkg --add-architecture ppc64el + +RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential \ + crossbuild-essential-arm64 \ + crossbuild-essential-armel \ + crossbuild-essential-armhf \ + crossbuild-essential-ppc64el \ + curl \ + gawk \ + 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 \ + sudo \ + uidmap \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/*; # 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 @@ -37,30 +50,31 @@ RUN dpkg --add-architecture armel \ RUN useradd -u1000 -m -d/home/rootless -s/bin/bash rootless # install bats +ARG BATS_VERSION RUN cd /tmp \ && git clone https://github.com/sstephenson/bats.git \ && cd bats \ - && git reset --hard 03608115df2071fff4eaaff1605768c275e5f81f \ + && git reset --hard "${BATS_VERSION}" \ && ./install.sh /usr/local \ && rm -rf /tmp/bats # install criu -ENV CRIU_VERSION v3.12 +ARG CRIU_VERSION RUN mkdir -p /usr/src/criu \ && curl -sSL https://github.com/checkpoint-restore/criu/archive/${CRIU_VERSION}.tar.gz | tar -v -C /usr/src/criu/ -xz --strip-components=1 \ && cd /usr/src/criu \ && make install-criu \ && rm -rf /usr/src/criu -# setup a playground for us to spawn containers in -ENV ROOTFS /busybox -RUN mkdir -p ${ROOTFS} - COPY script/tmpmount / WORKDIR /go/src/github.com/opencontainers/runc ENTRYPOINT ["/tmpmount"] -ADD . /go/src/github.com/opencontainers/runc - +# setup a playground for us to spawn containers in +COPY tests/integration/multi-arch.bash tests/integration/ +ENV ROOTFS /busybox +RUN mkdir -p ${ROOTFS} RUN . tests/integration/multi-arch.bash \ && curl -o- -sSL `get_busybox` | tar xfJC - ${ROOTFS} + +COPY . .