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

3 Use proper init process #7

Closed
wants to merge 1 commit into from
Closed

3 Use proper init process #7

wants to merge 1 commit into from

Conversation

cbromberg
Copy link

Added use of supervisord to control processes. This has the upside that no more defunct processes stay in the running container. These defunct processes piled up on our system and eventually depleted process and maybe even file handles.
supervisord is mentioned on https://docs.docker.com/engine/admin/multi-service_container/ as a moderately heavy-weight approach, a huge advantage (over even more lightweight process managers) is that it can easily be installed via apt-get.
The supervisord config file is created inside the Dockerfile to have all information in one place, this could be changed for the sake of better organisation.

Additionally it could be possible to have an even slicker setup if using root as the user that runs supervisord and rely on supervisord to switch to the daemon user, but I tried to keep the changes on somebody else's code base to a minimum - and I also did not want to mess with the entrypoint.sh.

Btw. great work - this image made running our multi-agent Bamboo environment much more concise using docker-compose - and upgrades are very smooth. Thx for your efforts.
Cheers, Christoffer

Added use of supervisord to control processes.
supervisord is mentioned on https://docs.docker.com/engine/admin/multi-service_container/ as a moderately heavy-weight approach, a huge advantage (over even more lightweight process managers) is that it can easily be installed via apt-get.
The supervisord config file is created inside the Dockerfile to have all information in one place, this could be changed for the sake of better organisation.
@cbromberg
Copy link
Author

I withdraw this pull request - although it works nice for us so far:

  • the problem of defunct processes should be solved by --init flag on docker 1.13.0 and docker-compose 1.13.0, (should still be documented in the README for the image)
  • Supervisord is actually not meant to be run as init process (PID 1) and could cause resource leakage

Currently we cannot use the --init, so I will stay with Supervisord until coreos distribution will include a newer docker version (currently 1.12.6)

Cheers, Christoffer

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

Successfully merging this pull request may close these issues.

None yet

1 participant