2019-04-03 08:17:31 +00:00
|
|
|
FROM golang:1.12
|
2017-11-01 15:24:59 +00:00
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
apparmor \
|
|
|
|
autoconf \
|
|
|
|
automake \
|
|
|
|
bison \
|
|
|
|
build-essential \
|
|
|
|
curl \
|
|
|
|
e2fslibs-dev \
|
|
|
|
gawk \
|
|
|
|
gettext \
|
2018-02-10 17:57:05 +00:00
|
|
|
go-md2man \
|
2017-11-01 15:24:59 +00:00
|
|
|
iptables \
|
|
|
|
pkg-config \
|
|
|
|
libaio-dev \
|
|
|
|
libcap-dev \
|
|
|
|
libfuse-dev \
|
2018-09-20 13:46:50 +00:00
|
|
|
libnet-dev \
|
|
|
|
libnl-3-dev \
|
2017-11-01 15:24:59 +00:00
|
|
|
libostree-dev \
|
|
|
|
libprotobuf-dev \
|
|
|
|
libprotobuf-c0-dev \
|
2019-04-03 08:17:31 +00:00
|
|
|
libseccomp2 \
|
|
|
|
libseccomp-dev \
|
2017-11-01 15:24:59 +00:00
|
|
|
libtool \
|
|
|
|
libudev-dev \
|
|
|
|
protobuf-c-compiler \
|
|
|
|
protobuf-compiler \
|
|
|
|
libglib2.0-dev \
|
|
|
|
libapparmor-dev \
|
|
|
|
btrfs-tools \
|
|
|
|
libdevmapper1.02.1 \
|
|
|
|
libdevmapper-dev \
|
|
|
|
libgpgme11-dev \
|
|
|
|
liblzma-dev \
|
|
|
|
netcat \
|
|
|
|
socat \
|
2018-08-02 14:25:28 +00:00
|
|
|
lsof \
|
2018-07-23 15:46:43 +00:00
|
|
|
xz-utils \
|
2019-04-03 09:39:34 +00:00
|
|
|
unzip \
|
|
|
|
python3-yaml \
|
2017-11-01 15:24:59 +00:00
|
|
|
--no-install-recommends \
|
|
|
|
&& apt-get clean
|
|
|
|
|
|
|
|
# Install runc
|
2018-12-04 11:19:58 +00:00
|
|
|
ENV RUNC_COMMIT 96ec2177ae841256168fcf76954f7177af9446eb
|
2017-11-01 15:24:59 +00:00
|
|
|
RUN set -x \
|
|
|
|
&& export GOPATH="$(mktemp -d)" \
|
|
|
|
&& git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \
|
|
|
|
&& cd "$GOPATH/src/github.com/opencontainers/runc" \
|
|
|
|
&& git fetch origin --tags \
|
|
|
|
&& git checkout -q "$RUNC_COMMIT" \
|
|
|
|
&& make static BUILDTAGS="seccomp selinux" \
|
|
|
|
&& cp runc /usr/bin/runc \
|
|
|
|
&& rm -rf "$GOPATH"
|
|
|
|
|
2018-01-16 22:33:56 +00:00
|
|
|
# Install conmon
|
2018-11-27 10:30:03 +00:00
|
|
|
ENV CRIO_COMMIT 7a283c391abb7bd25086a8ff91dbb36ebdd24466
|
2018-01-16 22:33:56 +00:00
|
|
|
RUN set -x \
|
|
|
|
&& export GOPATH="$(mktemp -d)" \
|
2018-09-07 13:31:40 +00:00
|
|
|
&& git clone https://github.com/kubernetes-sigs/cri-o.git "$GOPATH/src/github.com/kubernetes-sigs/cri-o.git" \
|
|
|
|
&& cd "$GOPATH/src/github.com/kubernetes-sigs/cri-o.git" \
|
2018-01-16 22:33:56 +00:00
|
|
|
&& git fetch origin --tags \
|
|
|
|
&& git checkout -q "$CRIO_COMMIT" \
|
2018-06-21 13:53:29 +00:00
|
|
|
&& make \
|
|
|
|
&& install -D -m 755 bin/conmon /usr/libexec/podman/conmon \
|
2018-01-16 22:33:56 +00:00
|
|
|
&& rm -rf "$GOPATH"
|
|
|
|
|
2017-11-01 15:24:59 +00:00
|
|
|
# Install CNI plugins
|
2018-01-04 18:59:33 +00:00
|
|
|
ENV CNI_COMMIT 7480240de9749f9a0a5c8614b17f1f03e0c06ab9
|
2017-11-01 15:24:59 +00:00
|
|
|
RUN set -x \
|
|
|
|
&& export GOPATH="$(mktemp -d)" \
|
|
|
|
&& git clone https://github.com/containernetworking/plugins.git "$GOPATH/src/github.com/containernetworking/plugins" \
|
|
|
|
&& cd "$GOPATH/src/github.com/containernetworking/plugins" \
|
|
|
|
&& git checkout -q "$CNI_COMMIT" \
|
|
|
|
&& ./build.sh \
|
2017-12-13 22:47:42 +00:00
|
|
|
&& mkdir -p /usr/libexec/cni \
|
|
|
|
&& cp bin/* /usr/libexec/cni \
|
2017-11-01 15:24:59 +00:00
|
|
|
&& rm -rf "$GOPATH"
|
|
|
|
|
2018-02-10 17:57:05 +00:00
|
|
|
# Install buildah
|
|
|
|
RUN set -x \
|
|
|
|
&& export GOPATH=/go \
|
2018-09-18 19:31:54 +00:00
|
|
|
&& git clone https://github.com/containers/buildah "$GOPATH/src/github.com/containers/buildah" \
|
|
|
|
&& cd "$GOPATH/src/github.com/containers/buildah" \
|
2018-02-10 17:57:05 +00:00
|
|
|
&& make \
|
|
|
|
&& make install
|
|
|
|
|
2018-01-24 14:45:55 +00:00
|
|
|
# Install ginkgo
|
|
|
|
RUN set -x \
|
|
|
|
&& export GOPATH=/go \
|
|
|
|
&& go get -u github.com/onsi/ginkgo/ginkgo \
|
|
|
|
&& install -D -m 755 "$GOPATH"/bin/ginkgo /usr/bin/
|
|
|
|
|
|
|
|
# Install gomega
|
|
|
|
RUN set -x \
|
|
|
|
&& export GOPATH=/go \
|
|
|
|
&& go get github.com/onsi/gomega/...
|
|
|
|
|
2018-08-22 13:12:40 +00:00
|
|
|
# Install easyjson
|
2018-08-09 18:38:52 +00:00
|
|
|
RUN set -x \
|
|
|
|
&& export GOPATH=/go \
|
2018-08-22 13:12:40 +00:00
|
|
|
&& go get -u github.com/mailru/easyjson/... \
|
|
|
|
&& install -D -m 755 "$GOPATH"/bin/easyjson /usr/bin/
|
2018-08-09 18:38:52 +00:00
|
|
|
|
2018-11-27 10:32:30 +00:00
|
|
|
# Install latest stable criu version
|
2018-09-20 13:46:50 +00:00
|
|
|
RUN set -x \
|
|
|
|
&& cd /tmp \
|
|
|
|
&& git clone https://github.com/checkpoint-restore/criu.git \
|
|
|
|
&& cd criu \
|
|
|
|
&& make \
|
|
|
|
&& install -D -m 755 criu/criu /usr/sbin/ \
|
|
|
|
&& rm -rf /tmp/criu
|
|
|
|
|
2018-01-24 14:45:55 +00:00
|
|
|
# Install cni config
|
|
|
|
#RUN make install.cni
|
|
|
|
RUN mkdir -p /etc/cni/net.d/
|
|
|
|
COPY cni/87-podman-bridge.conflist /etc/cni/net.d/87-podman-bridge.conflist
|
|
|
|
|
2017-11-01 15:24:59 +00:00
|
|
|
# Make sure we have some policy for pulling images
|
2018-01-30 19:19:01 +00:00
|
|
|
RUN mkdir -p /etc/containers && curl https://raw.githubusercontent.com/projectatomic/registries/master/registries.fedora -o /etc/containers/registries.conf
|
|
|
|
|
2017-11-01 15:24:59 +00:00
|
|
|
COPY test/policy.json /etc/containers/policy.json
|
|
|
|
COPY test/redhat_sigstore.yaml /etc/containers/registries.d/registry.access.redhat.com.yaml
|
|
|
|
|
2019-02-01 02:26:15 +00:00
|
|
|
ADD . /go/src/github.com/containers/libpod
|
|
|
|
|
|
|
|
RUN set -x && cd /go/src/github.com/containers/libpod
|
|
|
|
|
2018-08-16 10:41:15 +00:00
|
|
|
WORKDIR /go/src/github.com/containers/libpod
|