krallin / tini

A tiny but valid `init` for containers
MIT License
9.66k stars 505 forks source link

Using "docker run --init" with arguments to tini #215

Open paradoxon82 opened 1 year ago

paradoxon82 commented 1 year ago

Hello,

using tini directly in the dockerfile works well so far. However, ideally I would like it to be transparent, so that the dockerfile does not have to be changed Using "docker run --init" works, but then I cannot add flags to the tini call. Is there any way to do it?

Best regards, Daniel

AgustinRamiroDiaz commented 5 months ago

I think this is something that should be proposed to the docker community, I'm not sure that @krallin has the decision on this

AgustinRamiroDiaz commented 5 months ago

I've found a way to do it, but it's not ergonomic

docker run --init --entrypoint docker-init test -g -s -- <fill with your CMD>
test.sh && sh trap.sh"

Explanation: