2016-05-21 06:21:16 +08:00
|
|
|
FROM golang:1.6.2
|
2015-06-27 04:06:17 +08:00
|
|
|
|
2016-04-14 03:37:54 +08:00
|
|
|
# libseccomp in jessie is not _quite_ new enough -- need backports version
|
|
|
|
RUN echo 'deb http://httpredir.debian.org/debian jessie-backports main' > /etc/apt/sources.list.d/backports.list
|
|
|
|
|
2015-09-23 05:58:14 +08:00
|
|
|
RUN apt-get update && apt-get install -y \
|
2016-01-16 02:56:34 +08:00
|
|
|
build-essential \
|
|
|
|
curl \
|
2016-05-10 19:54:22 +08:00
|
|
|
gawk \
|
2016-01-16 02:56:34 +08:00
|
|
|
iptables \
|
2016-05-25 05:56:02 +08:00
|
|
|
pkg-config \
|
2016-01-16 02:56:34 +08:00
|
|
|
libaio-dev \
|
|
|
|
libcap-dev \
|
|
|
|
libprotobuf-dev \
|
|
|
|
libprotobuf-c0-dev \
|
2016-04-14 03:37:54 +08:00
|
|
|
libseccomp2/jessie-backports \
|
|
|
|
libseccomp-dev/jessie-backports \
|
2016-01-16 02:56:34 +08:00
|
|
|
protobuf-c-compiler \
|
|
|
|
protobuf-compiler \
|
|
|
|
python-minimal \
|
|
|
|
--no-install-recommends
|
2015-09-23 05:58:14 +08:00
|
|
|
|
2016-04-26 16:00:01 +08:00
|
|
|
# install bats
|
2016-03-15 03:55:05 +08:00
|
|
|
RUN cd /tmp \
|
|
|
|
&& git clone https://github.com/sstephenson/bats.git \
|
|
|
|
&& cd bats \
|
|
|
|
&& git reset --hard 03608115df2071fff4eaaff1605768c275e5f81f \
|
|
|
|
&& ./install.sh /usr/local
|
|
|
|
|
2015-09-23 05:58:14 +08:00
|
|
|
# install criu
|
|
|
|
ENV CRIU_VERSION 1.7
|
|
|
|
RUN mkdir -p /usr/src/criu \
|
2016-03-15 03:55:05 +08:00
|
|
|
&& curl -sSL https://github.com/xemul/criu/archive/v${CRIU_VERSION}.tar.gz | tar -v -C /usr/src/criu/ -xz --strip-components=1 \
|
|
|
|
&& cd /usr/src/criu \
|
|
|
|
&& make install-criu
|
2015-06-27 04:06:17 +08:00
|
|
|
|
|
|
|
# setup a playground for us to spawn containers in
|
2016-04-26 16:00:01 +08:00
|
|
|
ENV ROOTFS /busybox
|
|
|
|
RUN mkdir -p ${ROOTFS} \
|
|
|
|
&& curl -o- -sSL 'https://github.com/jpetazzo/docker-busybox/raw/buildroot-2014.11/rootfs.tar' | tar -C ${ROOTFS} -xf -
|
2015-06-27 04:06:17 +08:00
|
|
|
|
2015-07-31 04:20:10 +08:00
|
|
|
COPY script/tmpmount /
|
2015-06-27 04:06:17 +08:00
|
|
|
WORKDIR /go/src/github.com/opencontainers/runc
|
2015-07-31 04:20:10 +08:00
|
|
|
ENTRYPOINT ["/tmpmount"]
|