I'm trying to use tini
in my Dockerfile but I'm getting an error.
I used the code example from the tini
readme file.
# ... code which builds /app/foo
# Add Tini
ENV TINI_VERSION v0.18.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--"]
# Run the program when the container starts
CMD ["/app/foo"]
I expect my program to run without having PID=1
but instead I get: standard_init_linux.go:207: exec user process caused "no such file or directory"
EDIT:
/app/foo
is created in the beginning of the Dockerfile. There is no problem with /app/foo
. As proof of this, if I comment out the ENTRYPOINT
line (or remove all the tini
related code), my /app/foo
runs fine except for the fact that it has PID=1