Closed jan-cerny closed 8 years ago
@jan-cerny Can you provide an example? This sounds like low hanging fruit.
@mpreisler I had a look into this today again. The label STOP contains a command that should be run just before stopping the container. When this label is not present, atomic stop
just stops the running container.
The manual page man atomic stop
provides this example:
LABEL STOP /usr/bin/docker kill -s HUP \${NAME}
Please see the man page for clarification of this command.
For us it means:
@mpreisler Do we have some way how to tell the deamon that it will terminate?
@jan-cerny Yeah, the daemon will react to SIGINT and SIGTERM as you'd expect. I think sending a signal and waiting a few seconds would do the trick.
Fixed in c267fd086976646f8d805264ebadf01dea767c5a
Atomic has
stop
command to stop running containers. To use this feature, the Dockerfile has to contain LABEL STOP, that contains the command to stop the containerized application.