Announcing Docker 1.2.0
The hardworking folk at Docker, Inc. are proud to announce the release of version 1.2.0 of Docker. We’ve made improvements throughout the Docker platform, including updates to Docker Engine, Docker Hub, and our documentation.
Highlights include these new features:
restart policies
We added a --restart
flag to docker run
to specify a restart policy for your container. Currently, there are three policies available:
- no – Do not restart the container if it dies. (default)
- on-failure – Restart the container if it exits with a non-zero exit code.
- Can also accept an optional maximum restart count (e.g. on-failure:5).
- always – Always restart the container no matter what exit code is returned.
This deprecates the --restart
flag on the Docker daemon.
A few examples:
- Redis will endlessly try to restart if the container exits
docker run --restart=always redis
- If redis exits with a non-zero exit code, it will try to restart 5 times before giving up:
docker run --restart=on-failure:5 redis
–cap-add –cap-drop
Currently, Docker containers can either be given complete capabilities or they can all follow a whitelist of allowed capabilities while dropping all others. Further, previously, using --privileged
would grant all capabilities inside a container, rather than applying a whitelist. This was not Continue reading