Skip to content

Instantly share code, notes, and snippets.

@jessfraz

jessfraz/Dockerfile.jessie

Last active Apr 26, 2020
Embed
What would you like to do?
testing seccomp
FROM debian:jessie
RUN apt-get update && apt-get install -y \
ca-certificates \
curl \
e2fsprogs \
init-system-helpers \
iptables \
libapparmor1 \
libltdl7 \
libseccomp2 \
silversearcher-ag \
procps \
xfsprogs \
xz-utils \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
ENV BUCKET s3.j3ss.co/tmp
ENV VERSION docker-engine_1.12.0~dev~git20160603.165343.0.21cb5ed-0~jessie_amd64.deb
ENV SHA256 e8bff7d037e1669898cd2159377affa7b4f5433072d806c8c3981e5649cf784b
RUN set -x \
&& curl -fSL "https://${BUCKET}/${VERSION}" -o docker.deb \
&& echo "${SHA256} *docker.deb" | sha256sum -c - \
&& apt-get update \
&& dpkg -i docker.deb \
&& rm docker.deb \
&& rm -rf /var/lib/apt/lists/* \
&& docker -v
CMD ["docker", "daemon", "-D"]
FROM debian:jessie-backports
RUN apt-get update && apt-get install -y \
ca-certificates \
curl \
e2fsprogs \
init-system-helpers \
iptables \
libapparmor1 \
libltdl7 \
libseccomp2 \
silversearcher-ag \
procps \
xz-utils \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
ENV BUCKET s3.j3ss.co/tmp
ENV VERSION docker-engine_1.12.0~dev~git20160603.165343.0.21cb5ed-0~jessie_amd64.deb
ENV SHA256 e8bff7d037e1669898cd2159377affa7b4f5433072d806c8c3981e5649cf784b
RUN set -x \
&& curl -fSL "https://${BUCKET}/${VERSION}" -o docker.deb \
&& echo "${SHA256} *docker.deb" | sha256sum -c - \
&& apt-get update \
&& dpkg -i docker.deb \
&& rm docker.deb \
&& rm -rf /var/lib/apt/lists/* \
&& docker -v
CMD ["docker", "daemon", "-D"]
FROM ubuntu:trusty
RUN apt-get update && apt-get install -y \
ca-certificates \
curl \
e2fsprogs \
init-system-helpers \
iptables \
libapparmor1 \
libltdl7 \
libseccomp2 \
libsystemd-journal0 \
silversearcher-ag \
procps \
xz-utils \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
ENV BUCKET s3.j3ss.co/tmp
ENV VERSION docker-engine_1.12.0~dev~git20160603.165343.0.4b752e9-0~trusty_amd64.deb
ENV SHA256 29b74da90cf533db4493e38c7599eafee1f27990895bfdfc94feecaa3a296202
RUN set -x \
&& curl -fSL "https://${BUCKET}/${VERSION}" -o docker.deb \
&& echo "${SHA256} *docker.deb" | sha256sum -c - \
&& apt-get update \
&& dpkg -i docker.deb \
&& rm docker.deb \
&& rm -rf /var/lib/apt/lists/* \
&& docker -v
CMD ["docker", "daemon", "-D"]
FROM ubuntu:trusty
RUN awk '$1 ~ "^deb" { $3 = $3 "-backports"; print; exit }' /etc/apt/sources.list > /etc/apt/sources.list.d/backports.list
RUN apt-get update && apt-get install -y \
ca-certificates \
curl \
e2fsprogs \
init-system-helpers \
iptables \
libapparmor1 \
libltdl7 \
libseccomp2 \
libsystemd-journal0 \
silversearcher-ag \
procps \
xz-utils \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
ENV BUCKET s3.j3ss.co/tmp
ENV VERSION docker-engine_1.12.0~dev~git20160603.165343.0.4b752e9-0~trusty_amd64.deb
ENV SHA256 29b74da90cf533db4493e38c7599eafee1f27990895bfdfc94feecaa3a296202
RUN set -x \
&& curl -fSL "https://${BUCKET}/${VERSION}" -o docker.deb \
&& echo "${SHA256} *docker.deb" | sha256sum -c - \
&& apt-get update \
&& dpkg -i docker.deb \
&& rm docker.deb \
&& rm -rf /var/lib/apt/lists/* \
&& docker -v
CMD ["docker", "daemon", "-D"]
BUILD_CMD := docker build --rm --force-rm
RUN_CMD := docker run -d --privileged
build: trusty trusty-bp jessie jessie-bp
trusty:
$(BUILD_CMD) -f Dockerfile.$@ -t dockertest:$@ .
trusty-bp:
$(BUILD_CMD) -f Dockerfile.$@ -t dockertest:$@ .
jessie:
$(BUILD_CMD) -f Dockerfile.$@ -t dockertest:$@ .
jessie-bp:
$(BUILD_CMD) -f Dockerfile.$@ -t dockertest:$@ .
run-jessie: jessie
-@docker rm -f $@
$(RUN_CMD) --name $@ dockertest:jessie
docker exec -it $@ docker run -d --name sleeper alpine sleep 30
docker exec -it $@ ag seccomp /run/docker/
docker exec -it $@ docker ps -a
run-jessiebp: jessie-bp
-@docker rm -f $@
$(RUN_CMD) --name $@ dockertest:jessie-bp
docker exec -it $@ docker run -d --name sleeper alpine sleep 30
docker exec -it $@ ag seccomp /run/docker/
docker exec -it $@ docker ps -a
run-trusty: trusty
-@docker rm -f $@
$(RUN_CMD) --name $@ dockertest:trusty
docker exec -it $@ docker run -d --name sleeper alpine sleep 30
docker exec -it $@ ag seccomp /run/docker/
docker exec -it $@ docker ps -a
run-trustybp: trusty-bp
-@docker rm -f $@
$(RUN_CMD) --name $@ dockertest:trusty-bp
docker exec -it $@ docker run -d --name sleeper alpine sleep 30
docker exec -it $@ ag seccomp /run/docker/
docker exec -it $@ docker ps -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment