mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #28037 from crosbymichael/tini
Replace grimes with tini for default init shipped in Docker
This commit is contained in:
commit
93e837d1d2
13 changed files with 50 additions and 38 deletions
|
@ -47,6 +47,7 @@ RUN apt-get update && apt-get install -y \
|
||||||
btrfs-tools \
|
btrfs-tools \
|
||||||
build-essential \
|
build-essential \
|
||||||
clang \
|
clang \
|
||||||
|
cmake \
|
||||||
createrepo \
|
createrepo \
|
||||||
curl \
|
curl \
|
||||||
dpkg-sig \
|
dpkg-sig \
|
||||||
|
@ -74,6 +75,7 @@ RUN apt-get update && apt-get install -y \
|
||||||
python-websocket \
|
python-websocket \
|
||||||
ubuntu-zfs \
|
ubuntu-zfs \
|
||||||
xfsprogs \
|
xfsprogs \
|
||||||
|
vim-common \
|
||||||
libzfs-dev \
|
libzfs-dev \
|
||||||
tar \
|
tar \
|
||||||
zip \
|
zip \
|
||||||
|
@ -232,10 +234,10 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \
|
||||||
hello-world:latest@sha256:8be990ef2aeb16dbcb9271ddfe2610fa6658d13f6dfb8bc72074cc1ca36966a7
|
hello-world:latest@sha256:8be990ef2aeb16dbcb9271ddfe2610fa6658d13f6dfb8bc72074cc1ca36966a7
|
||||||
# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is)
|
# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is)
|
||||||
|
|
||||||
# Install tomlv, vndr, runc, containerd, grimes, docker-proxy
|
# Install tomlv, vndr, runc, containerd, tini, docker-proxy
|
||||||
# Please edit hack/dockerfile/install-binaries.sh to update them.
|
# Please edit hack/dockerfile/install-binaries.sh to update them.
|
||||||
COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh
|
COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh
|
||||||
RUN /tmp/install-binaries.sh tomlv vndr runc containerd grimes proxy
|
RUN /tmp/install-binaries.sh tomlv vndr runc containerd tini proxy
|
||||||
|
|
||||||
# Wrap all commands in the "docker-in-docker" script to allow nested containers
|
# Wrap all commands in the "docker-in-docker" script to allow nested containers
|
||||||
ENTRYPOINT ["hack/dind"]
|
ENTRYPOINT ["hack/dind"]
|
||||||
|
|
|
@ -25,6 +25,7 @@ RUN apt-get update && apt-get install -y \
|
||||||
bash-completion \
|
bash-completion \
|
||||||
btrfs-tools \
|
btrfs-tools \
|
||||||
build-essential \
|
build-essential \
|
||||||
|
cmake \
|
||||||
createrepo \
|
createrepo \
|
||||||
curl \
|
curl \
|
||||||
dpkg-sig \
|
dpkg-sig \
|
||||||
|
@ -50,6 +51,7 @@ RUN apt-get update && apt-get install -y \
|
||||||
gccgo \
|
gccgo \
|
||||||
iproute2 \
|
iproute2 \
|
||||||
iputils-ping \
|
iputils-ping \
|
||||||
|
vim-common \
|
||||||
--no-install-recommends
|
--no-install-recommends
|
||||||
|
|
||||||
# Get lvm2 source for compiling statically
|
# Get lvm2 source for compiling statically
|
||||||
|
@ -160,10 +162,10 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \
|
||||||
aarch64/hello-world:latest@sha256:65a4a158587b307bb02db4de41b836addb0c35175bdc801367b1ac1ddeb9afda
|
aarch64/hello-world:latest@sha256:65a4a158587b307bb02db4de41b836addb0c35175bdc801367b1ac1ddeb9afda
|
||||||
# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is)
|
# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is)
|
||||||
|
|
||||||
# Install tomlv, vndr, runc, containerd, grimes, docker-proxy
|
# Install tomlv, vndr, runc, containerd, tini, docker-proxy
|
||||||
# Please edit hack/dockerfile/install-binaries.sh to update them.
|
# Please edit hack/dockerfile/install-binaries.sh to update them.
|
||||||
COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh
|
COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh
|
||||||
RUN /tmp/install-binaries.sh tomlv vndr runc containerd grimes proxy
|
RUN /tmp/install-binaries.sh tomlv vndr runc containerd tini proxy
|
||||||
|
|
||||||
# Wrap all commands in the "docker-in-docker" script to allow nested containers
|
# Wrap all commands in the "docker-in-docker" script to allow nested containers
|
||||||
ENTRYPOINT ["hack/dind"]
|
ENTRYPOINT ["hack/dind"]
|
||||||
|
|
|
@ -27,6 +27,7 @@ RUN apt-get update && apt-get install -y \
|
||||||
build-essential \
|
build-essential \
|
||||||
createrepo \
|
createrepo \
|
||||||
curl \
|
curl \
|
||||||
|
cmake \
|
||||||
dpkg-sig \
|
dpkg-sig \
|
||||||
git \
|
git \
|
||||||
iptables \
|
iptables \
|
||||||
|
@ -46,6 +47,7 @@ RUN apt-get update && apt-get install -y \
|
||||||
python-websocket \
|
python-websocket \
|
||||||
xfsprogs \
|
xfsprogs \
|
||||||
tar \
|
tar \
|
||||||
|
vim-common \
|
||||||
--no-install-recommends \
|
--no-install-recommends \
|
||||||
&& pip install awscli==1.10.15
|
&& pip install awscli==1.10.15
|
||||||
|
|
||||||
|
@ -164,10 +166,10 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \
|
||||||
armhf/hello-world:latest@sha256:161dcecea0225975b2ad5f768058212c1e0d39e8211098666ffa1ac74cfb7791
|
armhf/hello-world:latest@sha256:161dcecea0225975b2ad5f768058212c1e0d39e8211098666ffa1ac74cfb7791
|
||||||
# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is)
|
# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is)
|
||||||
|
|
||||||
# Install tomlv, vndr, runc, containerd, grimes, docker-proxy
|
# Install tomlv, vndr, runc, containerd, tini, docker-proxy
|
||||||
# Please edit hack/dockerfile/install-binaries.sh to update them.
|
# Please edit hack/dockerfile/install-binaries.sh to update them.
|
||||||
COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh
|
COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh
|
||||||
RUN /tmp/install-binaries.sh tomlv vndr runc containerd grimes proxy
|
RUN /tmp/install-binaries.sh tomlv vndr runc containerd tini proxy
|
||||||
|
|
||||||
ENTRYPOINT ["hack/dind"]
|
ENTRYPOINT ["hack/dind"]
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ RUN apt-get update && apt-get install -y \
|
||||||
bash-completion \
|
bash-completion \
|
||||||
btrfs-tools \
|
btrfs-tools \
|
||||||
build-essential \
|
build-essential \
|
||||||
|
cmake \
|
||||||
createrepo \
|
createrepo \
|
||||||
curl \
|
curl \
|
||||||
dpkg-sig \
|
dpkg-sig \
|
||||||
|
@ -47,6 +48,7 @@ RUN apt-get update && apt-get install -y \
|
||||||
python-websocket \
|
python-websocket \
|
||||||
xfsprogs \
|
xfsprogs \
|
||||||
tar \
|
tar \
|
||||||
|
vim-common \
|
||||||
--no-install-recommends
|
--no-install-recommends
|
||||||
|
|
||||||
# Get lvm2 source for compiling statically
|
# Get lvm2 source for compiling statically
|
||||||
|
@ -183,10 +185,10 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \
|
||||||
ppc64le/hello-world:latest@sha256:186a40a9a02ca26df0b6c8acdfb8ac2f3ae6678996a838f977e57fac9d963974
|
ppc64le/hello-world:latest@sha256:186a40a9a02ca26df0b6c8acdfb8ac2f3ae6678996a838f977e57fac9d963974
|
||||||
# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is)
|
# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is)
|
||||||
|
|
||||||
# Install tomlv, vndr, runc, containerd, grimes, docker-proxy
|
# Install tomlv, vndr, runc, containerd, tini, docker-proxy
|
||||||
# Please edit hack/dockerfile/install-binaries.sh to update them.
|
# Please edit hack/dockerfile/install-binaries.sh to update them.
|
||||||
COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh
|
COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh
|
||||||
RUN /tmp/install-binaries.sh tomlv vndr runc containerd grimes proxy
|
RUN /tmp/install-binaries.sh tomlv vndr runc containerd tini proxy
|
||||||
|
|
||||||
# Wrap all commands in the "docker-in-docker" script to allow nested containers
|
# Wrap all commands in the "docker-in-docker" script to allow nested containers
|
||||||
ENTRYPOINT ["hack/dind"]
|
ENTRYPOINT ["hack/dind"]
|
||||||
|
|
|
@ -25,6 +25,7 @@ RUN apt-get update && apt-get install -y \
|
||||||
bash-completion \
|
bash-completion \
|
||||||
btrfs-tools \
|
btrfs-tools \
|
||||||
build-essential \
|
build-essential \
|
||||||
|
cmake \
|
||||||
createrepo \
|
createrepo \
|
||||||
curl \
|
curl \
|
||||||
dpkg-sig \
|
dpkg-sig \
|
||||||
|
@ -46,6 +47,7 @@ RUN apt-get update && apt-get install -y \
|
||||||
python-websocket \
|
python-websocket \
|
||||||
xfsprogs \
|
xfsprogs \
|
||||||
tar \
|
tar \
|
||||||
|
vim-common \
|
||||||
--no-install-recommends
|
--no-install-recommends
|
||||||
|
|
||||||
# glibc in Debian has a bug specific to s390x that won't be fixed until Debian 8.6 is released
|
# 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 \
|
||||||
s390x/hello-world:latest@sha256:780d80b3a7677c3788c0d5cd9168281320c8d4a6d9183892d8ee5cdd610f5699
|
s390x/hello-world:latest@sha256:780d80b3a7677c3788c0d5cd9168281320c8d4a6d9183892d8ee5cdd610f5699
|
||||||
# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is)
|
# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is)
|
||||||
|
|
||||||
# Install tomlv, vndr, runc, containerd, grimes, docker-proxy
|
# Install tomlv, vndr, runc, containerd, tini, docker-proxy
|
||||||
# Please edit hack/dockerfile/install-binaries.sh to update them.
|
# Please edit hack/dockerfile/install-binaries.sh to update them.
|
||||||
COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh
|
COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh
|
||||||
RUN /tmp/install-binaries.sh tomlv vndr runc containerd grimes proxy
|
RUN /tmp/install-binaries.sh tomlv vndr runc containerd tini proxy
|
||||||
|
|
||||||
# Wrap all commands in the "docker-in-docker" script to allow nested containers
|
# Wrap all commands in the "docker-in-docker" script to allow nested containers
|
||||||
ENTRYPOINT ["hack/dind"]
|
ENTRYPOINT ["hack/dind"]
|
||||||
|
|
|
@ -14,6 +14,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
btrfs-tools \
|
btrfs-tools \
|
||||||
build-essential \
|
build-essential \
|
||||||
curl \
|
curl \
|
||||||
|
cmake \
|
||||||
gcc \
|
gcc \
|
||||||
git \
|
git \
|
||||||
libapparmor-dev \
|
libapparmor-dev \
|
||||||
|
@ -28,6 +29,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
xz-utils \
|
xz-utils \
|
||||||
\
|
\
|
||||||
aufs-tools \
|
aufs-tools \
|
||||||
|
vim-common \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Install seccomp: the version shipped in trusty is too old
|
# Install seccomp: the version shipped in trusty is too old
|
||||||
|
@ -56,10 +58,10 @@ ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
||||||
ENV GOPATH /go
|
ENV GOPATH /go
|
||||||
ENV CGO_LDFLAGS -L/lib
|
ENV CGO_LDFLAGS -L/lib
|
||||||
|
|
||||||
# Install runc, containerd, grimes and docker-proxy
|
# Install runc, containerd, tini and docker-proxy
|
||||||
# Please edit hack/dockerfile/install-binaries.sh to update them.
|
# Please edit hack/dockerfile/install-binaries.sh to update them.
|
||||||
COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh
|
COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh
|
||||||
RUN /tmp/install-binaries.sh runc containerd grimes proxy
|
RUN /tmp/install-binaries.sh runc containerd tini proxy
|
||||||
|
|
||||||
ENV AUTO_GOPATH 1
|
ENV AUTO_GOPATH 1
|
||||||
WORKDIR /usr/src/docker
|
WORKDIR /usr/src/docker
|
||||||
|
|
|
@ -163,23 +163,26 @@ func (daemon *Daemon) containerStart(container *container.Container, checkpoint
|
||||||
|
|
||||||
if err := daemon.containerd.Create(container.ID, checkpoint, checkpointDir, *spec, container.InitializeStdio, createOptions...); err != nil {
|
if err := daemon.containerd.Create(container.ID, checkpoint, checkpointDir, *spec, container.InitializeStdio, createOptions...); err != nil {
|
||||||
errDesc := grpc.ErrorDesc(err)
|
errDesc := grpc.ErrorDesc(err)
|
||||||
|
contains := func(s1, s2 string) bool {
|
||||||
|
return strings.Contains(strings.ToLower(s1), s2)
|
||||||
|
}
|
||||||
logrus.Errorf("Create container failed with error: %s", errDesc)
|
logrus.Errorf("Create container failed with error: %s", errDesc)
|
||||||
// if we receive an internal error from the initial start of a container then lets
|
// if we receive an internal error from the initial start of a container then lets
|
||||||
// return it instead of entering the restart loop
|
// return it instead of entering the restart loop
|
||||||
// set to 127 for container cmd not found/does not exist)
|
// set to 127 for container cmd not found/does not exist)
|
||||||
if strings.Contains(errDesc, container.Path) &&
|
if contains(errDesc, container.Path) &&
|
||||||
(strings.Contains(errDesc, "executable file not found") ||
|
(contains(errDesc, "executable file not found") ||
|
||||||
strings.Contains(errDesc, "no such file or directory") ||
|
contains(errDesc, "no such file or directory") ||
|
||||||
strings.Contains(errDesc, "system cannot find the file specified")) {
|
contains(errDesc, "system cannot find the file specified")) {
|
||||||
container.SetExitCode(127)
|
container.SetExitCode(127)
|
||||||
}
|
}
|
||||||
// set to 126 for container cmd can't be invoked errors
|
// set to 126 for container cmd can't be invoked errors
|
||||||
if strings.Contains(errDesc, syscall.EACCES.Error()) {
|
if contains(errDesc, syscall.EACCES.Error()) {
|
||||||
container.SetExitCode(126)
|
container.SetExitCode(126)
|
||||||
}
|
}
|
||||||
|
|
||||||
// attempted to mount a file onto a directory, or a directory onto a file, maybe from user specified bind mounts
|
// attempted to mount a file onto a directory, or a directory onto a file, maybe from user specified bind mounts
|
||||||
if strings.Contains(errDesc, syscall.ENOTDIR.Error()) {
|
if contains(errDesc, syscall.ENOTDIR.Error()) {
|
||||||
errDesc += ": Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type"
|
errDesc += ": Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type"
|
||||||
container.SetExitCode(127)
|
container.SetExitCode(127)
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ set -x
|
||||||
TOMLV_COMMIT=9baf8a8a9f2ed20a8e54160840c492f937eeaf9a
|
TOMLV_COMMIT=9baf8a8a9f2ed20a8e54160840c492f937eeaf9a
|
||||||
RUNC_COMMIT=ac031b5bf1cc92239461125f4c1ffb760522bbf2
|
RUNC_COMMIT=ac031b5bf1cc92239461125f4c1ffb760522bbf2
|
||||||
CONTAINERD_COMMIT=8517738ba4b82aff5662c97ca4627e7e4d03b531
|
CONTAINERD_COMMIT=8517738ba4b82aff5662c97ca4627e7e4d03b531
|
||||||
GRIMES_COMMIT=fe069a03affd2547fdb05e5b8b07202d2e41735b
|
TINI_COMMIT=v0.13.0
|
||||||
LIBNETWORK_COMMIT=0f534354b813003a754606689722fe253101bc4e
|
LIBNETWORK_COMMIT=0f534354b813003a754606689722fe253101bc4e
|
||||||
VNDR_COMMIT=f56bd4504b4fad07a357913687fb652ee54bb3b0
|
VNDR_COMMIT=f56bd4504b4fad07a357913687fb652ee54bb3b0
|
||||||
|
|
||||||
|
@ -77,13 +77,14 @@ do
|
||||||
install_containerd
|
install_containerd
|
||||||
;;
|
;;
|
||||||
|
|
||||||
grimes)
|
tini)
|
||||||
echo "Install grimes version $GRIMES_COMMIT"
|
echo "Install tini version $TINI_COMMIT"
|
||||||
git clone https://github.com/crosbymichael/grimes.git "$GOPATH/grimes"
|
git clone https://github.com/krallin/tini.git "$GOPATH/tini"
|
||||||
cd "$GOPATH/grimes"
|
cd "$GOPATH/tini"
|
||||||
git checkout -q "$GRIMES_COMMIT"
|
git checkout -q "$TINI_COMMIT"
|
||||||
make
|
cmake -DMINIMAL=ON .
|
||||||
cp init /usr/local/bin/docker-init
|
make tini-static
|
||||||
|
cp tini-static /usr/local/bin/docker-init
|
||||||
;;
|
;;
|
||||||
|
|
||||||
proxy)
|
proxy)
|
||||||
|
@ -104,7 +105,7 @@ do
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo echo "Usage: $0 [tomlv|runc|containerd|grimes|proxy]"
|
echo echo "Usage: $0 [tomlv|runc|containerd|tini|proxy]"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -138,7 +138,7 @@ install -p -m 755 /usr/local/bin/docker-containerd-ctr $RPM_BUILD_ROOT/%{_bindir
|
||||||
# install runc
|
# install runc
|
||||||
install -p -m 755 /usr/local/bin/docker-runc $RPM_BUILD_ROOT/%{_bindir}/docker-runc
|
install -p -m 755 /usr/local/bin/docker-runc $RPM_BUILD_ROOT/%{_bindir}/docker-runc
|
||||||
|
|
||||||
# install grimes
|
# install tini
|
||||||
install -p -m 755 /usr/local/bin/docker-init $RPM_BUILD_ROOT/%{_bindir}/docker-init
|
install -p -m 755 /usr/local/bin/docker-init $RPM_BUILD_ROOT/%{_bindir}/docker-init
|
||||||
|
|
||||||
# install udev rules
|
# install udev rules
|
||||||
|
|
|
@ -73,8 +73,8 @@ set -e
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat >> "$DEST/$version/Dockerfile.build" <<-EOF
|
cat >> "$DEST/$version/Dockerfile.build" <<-EOF
|
||||||
# Install runc, containerd, proxy and grimes
|
# Install runc, containerd, proxy and tini
|
||||||
RUN ./hack/dockerfile/install-binaries.sh runc-dynamic containerd-dynamic proxy-dynamic grimes
|
RUN ./hack/dockerfile/install-binaries.sh runc-dynamic containerd-dynamic proxy-dynamic tini
|
||||||
EOF
|
EOF
|
||||||
cat >> "$DEST/$version/Dockerfile.build" <<-EOF
|
cat >> "$DEST/$version/Dockerfile.build" <<-EOF
|
||||||
RUN cp -aL hack/make/.build-deb debian
|
RUN cp -aL hack/make/.build-deb debian
|
||||||
|
|
|
@ -94,8 +94,8 @@ set -e
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat >> "$DEST/$version/Dockerfile.build" <<-EOF
|
cat >> "$DEST/$version/Dockerfile.build" <<-EOF
|
||||||
# Install runc, containerd, proxy and grimes
|
# Install runc, containerd, proxy and tini
|
||||||
RUN TMP_GOPATH="/go" ./hack/dockerfile/install-binaries.sh runc-dynamic containerd-dynamic proxy-dynamic grimes
|
RUN TMP_GOPATH="/go" ./hack/dockerfile/install-binaries.sh runc-dynamic containerd-dynamic proxy-dynamic tini
|
||||||
EOF
|
EOF
|
||||||
if [[ "$VERSION" == *-dev ]] || [ -n "$(git status --porcelain)" ]; then
|
if [[ "$VERSION" == *-dev ]] || [ -n "$(git status --porcelain)" ]; then
|
||||||
echo 'ENV DOCKER_EXPERIMENTAL 1' >> "$DEST/$version/Dockerfile.build"
|
echo 'ENV DOCKER_EXPERIMENTAL 1' >> "$DEST/$version/Dockerfile.build"
|
||||||
|
@ -110,7 +110,7 @@ set -e
|
||||||
RUN tar --exclude .git -r -C /go/src/github.com/docker -f /root/rpmbuild/SOURCES/${rpmName}.tar containerd
|
RUN tar --exclude .git -r -C /go/src/github.com/docker -f /root/rpmbuild/SOURCES/${rpmName}.tar containerd
|
||||||
RUN tar --exclude .git -r -C /go/src/github.com/docker/libnetwork/cmd -f /root/rpmbuild/SOURCES/${rpmName}.tar proxy
|
RUN tar --exclude .git -r -C /go/src/github.com/docker/libnetwork/cmd -f /root/rpmbuild/SOURCES/${rpmName}.tar proxy
|
||||||
RUN tar --exclude .git -r -C /go/src/github.com/opencontainers -f /root/rpmbuild/SOURCES/${rpmName}.tar runc
|
RUN tar --exclude .git -r -C /go/src/github.com/opencontainers -f /root/rpmbuild/SOURCES/${rpmName}.tar runc
|
||||||
RUN tar --exclude .git -r -C /go/ -f /root/rpmbuild/SOURCES/${rpmName}.tar grimes
|
RUN tar --exclude .git -r -C /go/ -f /root/rpmbuild/SOURCES/${rpmName}.tar tini
|
||||||
RUN gzip /root/rpmbuild/SOURCES/${rpmName}.tar
|
RUN gzip /root/rpmbuild/SOURCES/${rpmName}.tar
|
||||||
RUN { cat /usr/src/${rpmName}/contrib/builder/rpm/${PACKAGE_ARCH}/changelog; } >> ${rpmName}.spec && tail >&2 ${rpmName}.spec
|
RUN { cat /usr/src/${rpmName}/contrib/builder/rpm/${PACKAGE_ARCH}/changelog; } >> ${rpmName}.spec && tail >&2 ${rpmName}.spec
|
||||||
RUN rpmbuild -ba \
|
RUN rpmbuild -ba \
|
||||||
|
|
|
@ -154,7 +154,7 @@ func (d *Daemon) StartWithLogFile(out *os.File, providedArgs ...string) error {
|
||||||
fmt.Sprintf("--userland-proxy=%t", d.userlandProxy),
|
fmt.Sprintf("--userland-proxy=%t", d.userlandProxy),
|
||||||
)
|
)
|
||||||
if experimentalDaemon {
|
if experimentalDaemon {
|
||||||
args = append(args, "--experimental")
|
args = append(args, "--experimental", "--init")
|
||||||
}
|
}
|
||||||
if !(d.useDefaultHost || d.useDefaultTLSHost) {
|
if !(d.useDefaultHost || d.useDefaultTLSHost) {
|
||||||
args = append(args, []string{"--host", d.sock()}...)
|
args = append(args, []string{"--host", d.sock()}...)
|
||||||
|
|
|
@ -2735,11 +2735,9 @@ func (s *DockerDaemonSuite) TestDaemonRestartSaveContainerExitCode(c *check.C) {
|
||||||
c.Assert(err, checker.IsNil)
|
c.Assert(err, checker.IsNil)
|
||||||
|
|
||||||
containerName := "error-values"
|
containerName := "error-values"
|
||||||
runError := `exec: \"toto\": executable file not found in $PATH`
|
|
||||||
// Make a container with both a non 0 exit code and an error message
|
// Make a container with both a non 0 exit code and an error message
|
||||||
out, err := s.d.Cmd("run", "--name", containerName, "busybox", "toto")
|
out, err := s.d.Cmd("run", "--name", containerName, "busybox", "toto")
|
||||||
c.Assert(err, checker.NotNil)
|
c.Assert(err, checker.NotNil)
|
||||||
c.Assert(out, checker.Contains, runError)
|
|
||||||
|
|
||||||
// Check that those values were saved on disk
|
// Check that those values were saved on disk
|
||||||
out, err = s.d.Cmd("inspect", "-f", "{{.State.ExitCode}}", containerName)
|
out, err = s.d.Cmd("inspect", "-f", "{{.State.ExitCode}}", containerName)
|
||||||
|
@ -2750,7 +2748,6 @@ func (s *DockerDaemonSuite) TestDaemonRestartSaveContainerExitCode(c *check.C) {
|
||||||
out, err = s.d.Cmd("inspect", "-f", "{{.State.Error}}", containerName)
|
out, err = s.d.Cmd("inspect", "-f", "{{.State.Error}}", containerName)
|
||||||
out = strings.TrimSpace(out)
|
out = strings.TrimSpace(out)
|
||||||
c.Assert(err, checker.IsNil)
|
c.Assert(err, checker.IsNil)
|
||||||
c.Assert(out, checker.Contains, runError)
|
|
||||||
|
|
||||||
// now restart daemon
|
// now restart daemon
|
||||||
err = s.d.Restart()
|
err = s.d.Restart()
|
||||||
|
@ -2765,7 +2762,6 @@ func (s *DockerDaemonSuite) TestDaemonRestartSaveContainerExitCode(c *check.C) {
|
||||||
out, err = s.d.Cmd("inspect", "-f", "{{.State.Error}}", containerName)
|
out, err = s.d.Cmd("inspect", "-f", "{{.State.Error}}", containerName)
|
||||||
out = strings.TrimSpace(out)
|
out = strings.TrimSpace(out)
|
||||||
c.Assert(err, checker.IsNil)
|
c.Assert(err, checker.IsNil)
|
||||||
c.Assert(out, checker.Contains, runError)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerDaemonSuite) TestDaemonBackcompatPre17Volumes(c *check.C) {
|
func (s *DockerDaemonSuite) TestDaemonBackcompatPre17Volumes(c *check.C) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue