OpenSCAP / openscap-daemon

Manages continuous scans of your infrastructure
https://www.open-scap.org/tools/openscap-daemon
GNU Lesser General Public License v2.1
106 stars 32 forks source link

Docker files are missing the label STOP #64

Closed jan-cerny closed 8 years ago

jan-cerny commented 8 years ago

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.

mpreisler commented 8 years ago

@jan-cerny Can you provide an example? This sounds like low hanging fruit.

jan-cerny commented 8 years ago

@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?

mpreisler commented 8 years ago

@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.

mpreisler commented 8 years ago

Fixed in c267fd086976646f8d805264ebadf01dea767c5a