-
Notifications
You must be signed in to change notification settings - Fork 425
Open
Description
With version 0.7.0, when I try to tail nginx's /var/log/nginx/access.log to stdout using -stdout /var/log/nginx/access.log, instead of printing the access log, I get for each request a line:
Warning: unable to tail /var/log/nginx/access.log: tomb: still alive
This repeats ~30 times until dockerize finally stops nginx and the container crashes.
Minimal reproducible example
- Dockerfile
ARG debian_version=10.13
FROM debian:${debian_version} AS build
MAINTAINER Ente "ducksource@duckpond.ch"
# Build dockerize
ARG dockerize_version=0.7.0
RUN set -ex \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends --no-install-suggests -y \
wget ca-certificates \
inotify-tools \
&& wget \
"https://github.com/jwilder/dockerize/releases/download/v${dockerize_version}/dockerize-linux-amd64-v${dockerize_version}.tar.gz" \
&& tar -C "/usr/local/bin" -xzvf "dockerize-linux-amd64-v${dockerize_version}.tar.gz" \
&& rm "dockerize-linux-amd64-v${dockerize_version}.tar.gz"
FROM debian:${debian_version}
# Install dockerize
RUN set -ex \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends --no-install-suggests -y \
inotify-tools
COPY --from=build /usr/local/bin/dockerize /usr/local/bin/dockerize
- Build container:
docker build . - Run dockerize in container
$ docker run -ti <image_id> bash
root@32e1af5fc110:/service# touch stdout
root@32e1af5fc110:/service# dockerize -stdout stdout
- Then in a new terminal:
$ docker exec -ti $(docker ps -q) bash
root@32e1af5fc110:/service# echo "AA" > stdout
- Check output of first terminal:
root@32e1af5fc110:/service# dockerize -stdout stdout
2023/06/11 08:39:29 Warning: unable to tail stdout: tomb: still alive
munir131, adengusiak and kaisensan
Metadata
Metadata
Assignees
Labels
No labels