forked from genuinetools/reg
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.dind
47 lines (37 loc) · 1.24 KB
/
Dockerfile.dind
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM alpine:3.3
# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies
RUN apk add --no-cache \
btrfs-progs \
ca-certificates \
curl \
e2fsprogs \
e2fsprogs-extra \
iptables \
xfsprogs \
xz
ENV DOCKER_BUCKET get.docker.com
ENV DOCKER_VERSION 1.11.1
ENV DOCKER_SHA256 893e3c6e89c0cd2c5f1e51ea41bc2dd97f5e791fcfa3cee28445df277836339d
RUN set -x \
&& curl -fSL "https://${DOCKER_BUCKET}/builds/Linux/x86_64/docker-$DOCKER_VERSION.tgz" -o docker.tgz \
&& echo "${DOCKER_SHA256} *docker.tgz" | sha256sum -c - \
&& tar -xzvf docker.tgz \
&& mv docker/* /usr/local/bin/ \
&& rmdir docker \
&& rm docker.tgz \
&& docker -v
# we need adduser/useradd for userns
RUN apk add --no-cache \
--repository http://dl-3.alpinelinux.org/alpine/edge/community/ \
shadow
ENV DIND_COMMIT 3b5fac462d21ca164b3778647420016315289034
RUN wget "https://raw.githubusercontent.com/docker/docker/${DIND_COMMIT}/hack/dind" -O /usr/local/bin/dind \
&& sed -i.bak 's/#!\/bin\/bash/#!\/bin\/sh/' /usr/local/bin/dind \
&& rm -rf /usr/local/bin/*.bak \
&& chmod +x /usr/local/bin/dind
RUN touch /etc/subuid \
&& touch /etc/subgid
EXPOSE 2375
COPY config /etc/docker/daemon/config
WORKDIR /etc/docker/daemon/config
ENTRYPOINT ["./setup_certs.sh"]