Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tini warning when building 1.28.1 image #256

Open
GJZwiers opened this issue Nov 24, 2022 · 4 comments
Open

Tini warning when building 1.28.1 image #256

GJZwiers opened this issue Nov 24, 2022 · 4 comments

Comments

@GJZwiers
Copy link

When building the denoland/deno image with docker build -t app . && docker run -it --init -p 1993:1993 app I get a warning on the terminal:

[WARN  tini (7)] Tini is not running as PID 1 and isn't registered as a child subreaper.
Zombie processes will not be re-parented to Tini, so zombie reaping won't work.
To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1.

This is the dockerfile being used:

FROM denoland/deno:1.28.1

EXPOSE 1993

WORKDIR /app

USER deno

COPY deps.ts .
RUN deno cache deps.ts

ADD . .
RUN deno cache main.ts

CMD ["run", "--allow-net", "main.ts"]

This does not happen if I use the version used on the Docker hub page which is 1.10.3

@EdJoPaTo
Copy link

EdJoPaTo commented Jan 1, 2023

--init already creates an init handler so tini is useless (which is why tini writes this warning).

Most processes (like Deno) are written to have a working init handler. Containers are meant to be pretty minimal so they only ship with the relevant processes. Container environments can add a pretty minimal init handler on run with --init which is the normal way of working with containers.

#165 added an init handler to the deno container image. So running with --init results in having two init handlers running which is what tini complains about.
While I personally would prefer to use the container environment --init handler the simplest solution with deno containers is to omit the --init on run.

The old version you mentioned (1.10.3) was probably before tini was added to this image so there wasnt a conflict of two init handlers then.

@GJZwiers
Copy link
Author

GJZwiers commented Jan 3, 2023

Thanks for looking into it! Running the image without --init works for me. The page on Docker Hub for the Deno image is where I got the command from but it may be outdated, i.e. the readme on https://github.com/denoland/deno_docker doesn't use --init in docker run anymore.

@enjikaka
Copy link

Also got this issue when upgrading from 1.25 to 1.30. I run Deno in Docker via Dokku and don't handle the containers myself; so quite weird to get the Tini message in my face like this. Added ENV TINI_SUBREAPER=true to my Dockerfile to remove the error.

@rafrafek
Copy link

rafrafek commented Jun 5, 2024

@GJZwiers I think you're right, I created #370 to track it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants