Docker 1.2 has been released, adding restart policies and improvements to Docker Engine, Docker Hub and Docker documentation.

(Related: Docker does deployment reconstruction)

Docker core engineer Victor Vieux announced the release in a blog post detailing the latest updates and improvements to the application container solution. The most significant new feature is restart policies, which allow the user to define a given container’s behavior should it die. The three policies currently available are either to command the container not to restart, to restart only if it exits with a non-zero code, or to always restart. Other additions and updates in version 1.2 include:
–cap-add and –cap-drop flags: These two new flags allow privileges to be added or removed from a running container, either giving them complete capabilities or specifying a whitelist of allowed capabilities while dropping the others.
Docker proxy in a separate process: Docker userland proxy now routes outbound traffic through a separate process, reducing daemon load to increase stability and efficiency.
–device flag: Allows a device to be used in ‘docker run’ without bind-mounting it in a “–privileged” container.
Host modifications: Hosts can now be edited in a running container to install bind or other services designed to override files.

Other smaller improvements include IPv6 address DNS support and added search on private registries. More can be found on the full blog post.