There is no reason to duplicate efforts and tini is well built and
better than grimes. It is a much stronger option for the default init
and @krallin has done a great job maintaining it and helping make
changes so that it will work with Docker.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
... | ... |
@@ -47,6 +47,7 @@ RUN apt-get update && apt-get install -y \ |
47 | 47 |
btrfs-tools \ |
48 | 48 |
build-essential \ |
49 | 49 |
clang \ |
50 |
+ cmake \ |
|
50 | 51 |
createrepo \ |
51 | 52 |
curl \ |
52 | 53 |
dpkg-sig \ |
... | ... |
@@ -74,6 +75,7 @@ RUN apt-get update && apt-get install -y \ |
74 | 74 |
python-websocket \ |
75 | 75 |
ubuntu-zfs \ |
76 | 76 |
xfsprogs \ |
77 |
+ vim-common \ |
|
77 | 78 |
libzfs-dev \ |
78 | 79 |
tar \ |
79 | 80 |
zip \ |
... | ... |
@@ -232,10 +234,10 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \ |
232 | 232 |
hello-world:latest@sha256:8be990ef2aeb16dbcb9271ddfe2610fa6658d13f6dfb8bc72074cc1ca36966a7 |
233 | 233 |
# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is) |
234 | 234 |
|
235 |
-# Install tomlv, vndr, runc, containerd, grimes, docker-proxy |
|
235 |
+# Install tomlv, vndr, runc, containerd, tini, docker-proxy |
|
236 | 236 |
# Please edit hack/dockerfile/install-binaries.sh to update them. |
237 | 237 |
COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh |
238 |
-RUN /tmp/install-binaries.sh tomlv vndr runc containerd grimes proxy |
|
238 |
+RUN /tmp/install-binaries.sh tomlv vndr runc containerd tini proxy |
|
239 | 239 |
|
240 | 240 |
# Wrap all commands in the "docker-in-docker" script to allow nested containers |
241 | 241 |
ENTRYPOINT ["hack/dind"] |
... | ... |
@@ -25,6 +25,7 @@ RUN apt-get update && apt-get install -y \ |
25 | 25 |
bash-completion \ |
26 | 26 |
btrfs-tools \ |
27 | 27 |
build-essential \ |
28 |
+ cmake \ |
|
28 | 29 |
createrepo \ |
29 | 30 |
curl \ |
30 | 31 |
dpkg-sig \ |
... | ... |
@@ -50,6 +51,7 @@ RUN apt-get update && apt-get install -y \ |
50 | 50 |
gccgo \ |
51 | 51 |
iproute2 \ |
52 | 52 |
iputils-ping \ |
53 |
+ vim-common \ |
|
53 | 54 |
--no-install-recommends |
54 | 55 |
|
55 | 56 |
# Get lvm2 source for compiling statically |
... | ... |
@@ -160,10 +162,10 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \ |
160 | 160 |
aarch64/hello-world:latest@sha256:65a4a158587b307bb02db4de41b836addb0c35175bdc801367b1ac1ddeb9afda |
161 | 161 |
# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is) |
162 | 162 |
|
163 |
-# Install tomlv, vndr, runc, containerd, grimes, docker-proxy |
|
163 |
+# Install tomlv, vndr, runc, containerd, tini, docker-proxy |
|
164 | 164 |
# Please edit hack/dockerfile/install-binaries.sh to update them. |
165 | 165 |
COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh |
166 |
-RUN /tmp/install-binaries.sh tomlv vndr runc containerd grimes proxy |
|
166 |
+RUN /tmp/install-binaries.sh tomlv vndr runc containerd tini proxy |
|
167 | 167 |
|
168 | 168 |
# Wrap all commands in the "docker-in-docker" script to allow nested containers |
169 | 169 |
ENTRYPOINT ["hack/dind"] |
... | ... |
@@ -27,6 +27,7 @@ RUN apt-get update && apt-get install -y \ |
27 | 27 |
build-essential \ |
28 | 28 |
createrepo \ |
29 | 29 |
curl \ |
30 |
+ cmake \ |
|
30 | 31 |
dpkg-sig \ |
31 | 32 |
git \ |
32 | 33 |
iptables \ |
... | ... |
@@ -46,6 +47,7 @@ RUN apt-get update && apt-get install -y \ |
46 | 46 |
python-websocket \ |
47 | 47 |
xfsprogs \ |
48 | 48 |
tar \ |
49 |
+ vim-common \ |
|
49 | 50 |
--no-install-recommends \ |
50 | 51 |
&& pip install awscli==1.10.15 |
51 | 52 |
|
... | ... |
@@ -164,10 +166,10 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \ |
164 | 164 |
armhf/hello-world:latest@sha256:161dcecea0225975b2ad5f768058212c1e0d39e8211098666ffa1ac74cfb7791 |
165 | 165 |
# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is) |
166 | 166 |
|
167 |
-# Install tomlv, vndr, runc, containerd, grimes, docker-proxy |
|
167 |
+# Install tomlv, vndr, runc, containerd, tini, docker-proxy |
|
168 | 168 |
# Please edit hack/dockerfile/install-binaries.sh to update them. |
169 | 169 |
COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh |
170 |
-RUN /tmp/install-binaries.sh tomlv vndr runc containerd grimes proxy |
|
170 |
+RUN /tmp/install-binaries.sh tomlv vndr runc containerd tini proxy |
|
171 | 171 |
|
172 | 172 |
ENTRYPOINT ["hack/dind"] |
173 | 173 |
|
... | ... |
@@ -26,6 +26,7 @@ RUN apt-get update && apt-get install -y \ |
26 | 26 |
bash-completion \ |
27 | 27 |
btrfs-tools \ |
28 | 28 |
build-essential \ |
29 |
+ cmake \ |
|
29 | 30 |
createrepo \ |
30 | 31 |
curl \ |
31 | 32 |
dpkg-sig \ |
... | ... |
@@ -47,6 +48,7 @@ RUN apt-get update && apt-get install -y \ |
47 | 47 |
python-websocket \ |
48 | 48 |
xfsprogs \ |
49 | 49 |
tar \ |
50 |
+ vim-common \ |
|
50 | 51 |
--no-install-recommends |
51 | 52 |
|
52 | 53 |
# Get lvm2 source for compiling statically |
... | ... |
@@ -183,10 +185,10 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \ |
183 | 183 |
ppc64le/hello-world:latest@sha256:186a40a9a02ca26df0b6c8acdfb8ac2f3ae6678996a838f977e57fac9d963974 |
184 | 184 |
# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is) |
185 | 185 |
|
186 |
-# Install tomlv, vndr, runc, containerd, grimes, docker-proxy |
|
186 |
+# Install tomlv, vndr, runc, containerd, tini, docker-proxy |
|
187 | 187 |
# Please edit hack/dockerfile/install-binaries.sh to update them. |
188 | 188 |
COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh |
189 |
-RUN /tmp/install-binaries.sh tomlv vndr runc containerd grimes proxy |
|
189 |
+RUN /tmp/install-binaries.sh tomlv vndr runc containerd tini proxy |
|
190 | 190 |
|
191 | 191 |
# Wrap all commands in the "docker-in-docker" script to allow nested containers |
192 | 192 |
ENTRYPOINT ["hack/dind"] |
... | ... |
@@ -25,6 +25,7 @@ RUN apt-get update && apt-get install -y \ |
25 | 25 |
bash-completion \ |
26 | 26 |
btrfs-tools \ |
27 | 27 |
build-essential \ |
28 |
+ cmake \ |
|
28 | 29 |
createrepo \ |
29 | 30 |
curl \ |
30 | 31 |
dpkg-sig \ |
... | ... |
@@ -46,6 +47,7 @@ RUN apt-get update && apt-get install -y \ |
46 | 46 |
python-websocket \ |
47 | 47 |
xfsprogs \ |
48 | 48 |
tar \ |
49 |
+ vim-common \ |
|
49 | 50 |
--no-install-recommends |
50 | 51 |
|
51 | 52 |
# glibc in Debian has a bug specific to s390x that won't be fixed until Debian 8.6 is released |
... | ... |
@@ -175,10 +177,10 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \ |
175 | 175 |
s390x/hello-world:latest@sha256:780d80b3a7677c3788c0d5cd9168281320c8d4a6d9183892d8ee5cdd610f5699 |
176 | 176 |
# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is) |
177 | 177 |
|
178 |
-# Install tomlv, vndr, runc, containerd, grimes, docker-proxy |
|
178 |
+# Install tomlv, vndr, runc, containerd, tini, docker-proxy |
|
179 | 179 |
# Please edit hack/dockerfile/install-binaries.sh to update them. |
180 | 180 |
COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh |
181 |
-RUN /tmp/install-binaries.sh tomlv vndr runc containerd grimes proxy |
|
181 |
+RUN /tmp/install-binaries.sh tomlv vndr runc containerd tini proxy |
|
182 | 182 |
|
183 | 183 |
# Wrap all commands in the "docker-in-docker" script to allow nested containers |
184 | 184 |
ENTRYPOINT ["hack/dind"] |
... | ... |
@@ -14,6 +14,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ |
14 | 14 |
btrfs-tools \ |
15 | 15 |
build-essential \ |
16 | 16 |
curl \ |
17 |
+ cmake \ |
|
17 | 18 |
gcc \ |
18 | 19 |
git \ |
19 | 20 |
libapparmor-dev \ |
... | ... |
@@ -28,6 +29,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ |
28 | 28 |
xz-utils \ |
29 | 29 |
\ |
30 | 30 |
aufs-tools \ |
31 |
+ vim-common \ |
|
31 | 32 |
&& rm -rf /var/lib/apt/lists/* |
32 | 33 |
|
33 | 34 |
# Install seccomp: the version shipped in trusty is too old |
... | ... |
@@ -56,10 +58,10 @@ ENV PATH /go/bin:/usr/local/go/bin:$PATH |
56 | 56 |
ENV GOPATH /go |
57 | 57 |
ENV CGO_LDFLAGS -L/lib |
58 | 58 |
|
59 |
-# Install runc, containerd, grimes and docker-proxy |
|
59 |
+# Install runc, containerd, tini and docker-proxy |
|
60 | 60 |
# Please edit hack/dockerfile/install-binaries.sh to update them. |
61 | 61 |
COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh |
62 |
-RUN /tmp/install-binaries.sh runc containerd grimes proxy |
|
62 |
+RUN /tmp/install-binaries.sh runc containerd tini proxy |
|
63 | 63 |
|
64 | 64 |
ENV AUTO_GOPATH 1 |
65 | 65 |
WORKDIR /usr/src/docker |
... | ... |
@@ -5,7 +5,7 @@ set -x |
5 | 5 |
TOMLV_COMMIT=9baf8a8a9f2ed20a8e54160840c492f937eeaf9a |
6 | 6 |
RUNC_COMMIT=ac031b5bf1cc92239461125f4c1ffb760522bbf2 |
7 | 7 |
CONTAINERD_COMMIT=8517738ba4b82aff5662c97ca4627e7e4d03b531 |
8 |
-GRIMES_COMMIT=fe069a03affd2547fdb05e5b8b07202d2e41735b |
|
8 |
+TINI_COMMIT=v0.13.0 |
|
9 | 9 |
LIBNETWORK_COMMIT=0f534354b813003a754606689722fe253101bc4e |
10 | 10 |
VNDR_COMMIT=f56bd4504b4fad07a357913687fb652ee54bb3b0 |
11 | 11 |
|
... | ... |
@@ -77,13 +77,14 @@ do |
77 | 77 |
install_containerd |
78 | 78 |
;; |
79 | 79 |
|
80 |
- grimes) |
|
81 |
- echo "Install grimes version $GRIMES_COMMIT" |
|
82 |
- git clone https://github.com/crosbymichael/grimes.git "$GOPATH/grimes" |
|
83 |
- cd "$GOPATH/grimes" |
|
84 |
- git checkout -q "$GRIMES_COMMIT" |
|
85 |
- make |
|
86 |
- cp init /usr/local/bin/docker-init |
|
80 |
+ tini) |
|
81 |
+ echo "Install tini version $TINI_COMMIT" |
|
82 |
+ git clone https://github.com/krallin/tini.git "$GOPATH/tini" |
|
83 |
+ cd "$GOPATH/tini" |
|
84 |
+ git checkout -q "$TINI_COMMIT" |
|
85 |
+ cmake -DMINIMAL=ON . |
|
86 |
+ make tini-static |
|
87 |
+ cp tini-static /usr/local/bin/docker-init |
|
87 | 88 |
;; |
88 | 89 |
|
89 | 90 |
proxy) |
... | ... |
@@ -104,7 +105,7 @@ do |
104 | 104 |
;; |
105 | 105 |
|
106 | 106 |
*) |
107 |
- echo echo "Usage: $0 [tomlv|runc|containerd|grimes|proxy]" |
|
107 |
+ echo echo "Usage: $0 [tomlv|runc|containerd|tini|proxy]" |
|
108 | 108 |
exit 1 |
109 | 109 |
|
110 | 110 |
esac |
... | ... |
@@ -138,7 +138,7 @@ install -p -m 755 /usr/local/bin/docker-containerd-ctr $RPM_BUILD_ROOT/%{_bindir |
138 | 138 |
# install runc |
139 | 139 |
install -p -m 755 /usr/local/bin/docker-runc $RPM_BUILD_ROOT/%{_bindir}/docker-runc |
140 | 140 |
|
141 |
-# install grimes |
|
141 |
+# install tini |
|
142 | 142 |
install -p -m 755 /usr/local/bin/docker-init $RPM_BUILD_ROOT/%{_bindir}/docker-init |
143 | 143 |
|
144 | 144 |
# install udev rules |
... | ... |
@@ -73,8 +73,8 @@ set -e |
73 | 73 |
EOF |
74 | 74 |
|
75 | 75 |
cat >> "$DEST/$version/Dockerfile.build" <<-EOF |
76 |
- # Install runc, containerd, proxy and grimes |
|
77 |
- RUN ./hack/dockerfile/install-binaries.sh runc-dynamic containerd-dynamic proxy-dynamic grimes |
|
76 |
+ # Install runc, containerd, proxy and tini |
|
77 |
+ RUN ./hack/dockerfile/install-binaries.sh runc-dynamic containerd-dynamic proxy-dynamic tini |
|
78 | 78 |
EOF |
79 | 79 |
cat >> "$DEST/$version/Dockerfile.build" <<-EOF |
80 | 80 |
RUN cp -aL hack/make/.build-deb debian |
... | ... |
@@ -94,8 +94,8 @@ set -e |
94 | 94 |
EOF |
95 | 95 |
|
96 | 96 |
cat >> "$DEST/$version/Dockerfile.build" <<-EOF |
97 |
- # Install runc, containerd, proxy and grimes |
|
98 |
- RUN TMP_GOPATH="/go" ./hack/dockerfile/install-binaries.sh runc-dynamic containerd-dynamic proxy-dynamic grimes |
|
97 |
+ # Install runc, containerd, proxy and tini |
|
98 |
+ RUN TMP_GOPATH="/go" ./hack/dockerfile/install-binaries.sh runc-dynamic containerd-dynamic proxy-dynamic tini |
|
99 | 99 |
EOF |
100 | 100 |
if [[ "$VERSION" == *-dev ]] || [ -n "$(git status --porcelain)" ]; then |
101 | 101 |
echo 'ENV DOCKER_EXPERIMENTAL 1' >> "$DEST/$version/Dockerfile.build" |
... | ... |
@@ -110,7 +110,7 @@ set -e |
110 | 110 |
RUN tar --exclude .git -r -C /go/src/github.com/docker -f /root/rpmbuild/SOURCES/${rpmName}.tar containerd |
111 | 111 |
RUN tar --exclude .git -r -C /go/src/github.com/docker/libnetwork/cmd -f /root/rpmbuild/SOURCES/${rpmName}.tar proxy |
112 | 112 |
RUN tar --exclude .git -r -C /go/src/github.com/opencontainers -f /root/rpmbuild/SOURCES/${rpmName}.tar runc |
113 |
- RUN tar --exclude .git -r -C /go/ -f /root/rpmbuild/SOURCES/${rpmName}.tar grimes |
|
113 |
+ RUN tar --exclude .git -r -C /go/ -f /root/rpmbuild/SOURCES/${rpmName}.tar tini |
|
114 | 114 |
RUN gzip /root/rpmbuild/SOURCES/${rpmName}.tar |
115 | 115 |
RUN { cat /usr/src/${rpmName}/contrib/builder/rpm/${PACKAGE_ARCH}/changelog; } >> ${rpmName}.spec && tail >&2 ${rpmName}.spec |
116 | 116 |
RUN rpmbuild -ba \ |
... | ... |
@@ -154,7 +154,7 @@ func (d *Daemon) StartWithLogFile(out *os.File, providedArgs ...string) error { |
154 | 154 |
fmt.Sprintf("--userland-proxy=%t", d.userlandProxy), |
155 | 155 |
) |
156 | 156 |
if experimentalDaemon { |
157 |
- args = append(args, "--experimental") |
|
157 |
+ args = append(args, "--experimental", "--init") |
|
158 | 158 |
} |
159 | 159 |
if !(d.useDefaultHost || d.useDefaultTLSHost) { |
160 | 160 |
args = append(args, []string{"--host", d.sock()}...) |