• Thanks, very helpful. Been search this for the last hour.

    Whats in the /sbin/my_init please?

  • @molinto

    The Dockerfile from my repo is based upon Phusion's Passenger ubuntu base image. This is what they have to say on my_init:

    According to the Unix process model, the init process -- PID 1 -- inherits all orphaned child processes and must reap them. Most Docker containers do not have an init process that does this correctly, and as a result their containers become filled with zombie processes over time.

    Furthermore, docker stop sends SIGTERM to the init process, which is then supposed to stop all services. Unfortunately most init systems don't do this correctly within Docker since they're built for hardware shutdowns instead. This causes processes to be hard killed with SIGKILL, which doesn't give them a chance to correctly deinitialize things. This can cause file corruption.

    Baseimage-docker comes with an init process /sbin/my_init that performs both of these tasks correctly.

    You can read more on that here.

  • Thanks for writing this up.

    My understanding is that the Dockerfile (which in this case includes the github token) gets commited to the repo with the rest of the code.

    Is there a way to have the token come from an environment variable? I wonder how this would work on Shippable.com.

  • Actually, Shippable supports deploy keys, so it would have the code local and not need to clone.

  • Hello Matt, this is a really good guide [which I followed to the letter :] ] . I was just wondering...is there a way to avoid having that token hardcoded in the dockerfile? I implemented a solution where I ask for the token as an ARG, but when I started using docker-compose I no longer can. I would like to give the token directly to the dev in order to setup the containers.

  • Thanks for the write up. This was very helpful!

  • Through your pen I found the problem up interesting! I believe there are many other people who are interested in them just like me! How long does it take to complete this article? I hope you continue to have such quality articles to share with everyone! spanish dictionary

Log In, Add a Comment