Docker Automatic Restart Policy

The Docker container can detect that PID 1 (main process) has stopped and will automatically restart the container if ‘docker run –restart=always’ is enabled. However, there are some signals not honored if the PID was killed using certain signals. Here is some data based on testing, as a reference:

This list applies to both Mac (running Docker-Machine) and Linux (all flavors). Tested on Docker v1

Tonight I spent the evening showing my son how to program a teleporter in Minecraft. Teleporters require coordinates to work. So the exchange went something like this:

Me: You are here. It is represented as [x, y, z] which is [-219, 54, 453].
Son: Ok!
Me: So, where are you?
Son: Here. (points to screen)
Me: No! Where are you in space?
Son: I’m not in space, I’m on the ground.
Me: No! What are your coordinates?
Son: Oh, it’s [x, y, z].
Me: No! What are your number coordinates, in space?
Son: Oh, it’s [-219, 54, 453]. But I want to teleport over there.
Me: But over there needs coordinates. That is [-200, 55, 450] and here is [-219, 54, 453].
Son: Ok, I got it!

We looked up how to enable the debugger, and this opened up a whole new world for him. All the coordinates appeared in realtime, so I think he’s going to go crazy building teleporters this weekend.