-
Notifications
You must be signed in to change notification settings - Fork 440
[docker] use tini as entrypoint #407
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
[docker] use tini as entrypoint #407
Conversation
Can't you use Also just using
|
If you have a long-running test who spawn a subprocess you'll see that |
Why are you going to need I was able to
|
Handling signals correctly is not only about Ctrl+C.
See below a quick example of how Ctrl+C is not propagate ( I had to kill the container to regain control ). |
Indeed, bash doesn't handle any maskable signals properly when running as pid1 (this is true of most programs). I think |
This seems to be localized enough in the docker container. However, we need to be careful with the additional dependency. It is written in C so it is platform dependent which version we want to install. The current code supports x86_64. |
0ecba77
to
55900de
Compare
@rockandska I added some commits on top of yours and rebased to sign yours. Please have a look if you are happy with the changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nits:
- could be a multistage build
- or could check GPG signatures when wget'd as per their docs
Happy to approve and note these as optimisations for the future
seems fine for me @martin-schulze-vireso |
Co-authored-by: Andrew Martin <sublimino@gmail.com>
I've been burned more than once with GPG signature checks due to keyserver issues. If we want to go this route I'd propose to have the key embedded. If we are just guarding against accidental errors, the sha256sum should be sufficient. I don't have experience with multistage builds, maybe you can venture a PR @sublimino? I'd concur to postpone these points. Maybe you can write up a followup issue for that? |
Since there is no additional requirements to install tini, I don't see clearly reasons to use multi stage build. |
100%, these are minor and don't block merge. When I find time I'll try to review other PRs rather than open new ones at the moment @martin-schulze-vireso, appreciate there's a few I could look at.
Not at all! It's just an alternative pattern ( Multistages makes And as these are not roadblocks I'm totally happy with the current wget approach. Good to merge in my mind 📦👍 |
This could help if multistage does the architecture handling automatically. |
TL;DR: Tini's github binaries are available for many (all?!) architectures. Containers aren't. For amd64 vs ARM etc -- container contents have to be compiled and the container tagged appropriately. There's no mechanism for docker to transparently serve architecture-specific containers for the same tag, and not for the SHA256 reference. In all honesty looking at the variety of compiled architectures for tini's binary releases on Github compared to the docker hub containers (exclusively I didn't consider that, a good point well made @martin-schulze-vireso 🙏 |
Well, as long as we do amd64 only, this is fine. But there is a requests issue for arm. |
Use tini as entrypoint to handle signals correctly and by abble to press
Ctrl+C
to cancel tests.More infos
Regards,