A Juju charm layer that handles installing Docker. This layer is somewhat
based on the juju-solutions docker charm
Charm for Docker
This charm deploys the Docker engine within Juju. Docker
is an open platform for developers and sysadmins to build, ship, and run
distributed applications in containers.
Docker containers wrap a piece of software in a complete file system that
contains everything needed to run an application on a server.
Docker focuses on distributing applications as containers that can be quickly
assembled from components that are run the same on different servers without
environmental dependencies. This eliminates the friction between development,
QA, and production environments.
Most people will want to extend this charm to make their Docker container or
application deployable from Juju. The
Charm layer can be extended to include docker container along with additional operational code. Please refer
to the Charm Layers
documentation on jujucharms.com for more
Using the Docker Charm
Docker does not require anything by default so you can deploy the Charm by the
juju deploy docker
NOTE: You can ask Juju to deploy a different release of Ubuntu by using the
--series and the code name of the release "trusty" for 14.04 and "xenial" for
Once deployed you have a docker-engine running on a unit in Juju. You can open
a session to that unit and issue the
docker command to start using it
juju ssh docker/0
$ docker run hello-world
Scale out Usage
Scaling out the Charm is as simple as adding additional docker units
add-unit command to expand your cluster. However, you will need an
SDN solution to provide cross host networking. See the Known Limitations and
issues about this.
- docker-opts : Pass through configuration to the docker daemon, such as configuring the docker daemon to allow an insecure private registry.
juju config docker docker-opts='--insecure-registry=http://my.insecure.registry:5000'
enable-cgroups = (false) : To enable memory and swap on system using GNU GRUB (GNU GRand Unified Bootloader) set this value to 'true'. It updates the
cgroup_enable=memory swapaccount=1. The default value is 'false'. WARNING: changing this option will initiate a reboot of the host - use with caution on as your containers will shutdown when this configuration value is
http_proxy : The string URL that will set the HTTP_PROXY environment variable for Docker containers. Useful in environments with restricted networks where a
proxy is the only route to the registry to pull images. Setting this option
forces the Docker daemon to restart.
https_proxy : The string URL that will set the HTTPS_PROXY environment variable for Docker containers. Useful in environments with restricted networks
where a proxy is the only route to the registry to pull images. Setting this
option forces the Docker daemon to restart.
This Charm also installs the 'docker-compose' python package using pip. So
once the Charm has finished installing you have the ability to use Docker
Compose functionality such as control files,
This Charm is available at https://jujucharms.com/docker and contains the
open source operations code to deploy on all public clouds in the Juju
- The Docker homepage
- Docker documentation for help with Docker commands.
- Docker forums for community discussions.
- Check the Docker issue tracker for bugs or problems with the Docker software.
- The layer-docker is the GitHub repository that contains the reactive code to build this Charm.
- Check the layer-docker issue-tracker for bugs or problems related to the Charm.
- (string) Space separated list of extra deb packages to install.
- (string) List of signing keys for install_sources package sources, per charmhelpers standard format (a yaml list of strings encoded as a string). The keys should be the full ASCII armoured GPG public keys. While GPG key ids are also supported and looked up on a keyserver, operators should be aware that this mechanism is insecure. null can be used if a standard package signing key is used that will already be installed on the machine, and for PPA sources where the package signing key is securely retrieved from Launchpad.
- (string) List of extra apt sources, per charm-helpers standard format (a yaml list of strings encoded as a string). Each source may be either a line that can be added directly to sources.list(5), or in the form ppa:<user>/<ppa-name> for adding Personal Package Archives, or a distribution component to enable.
- (string) The status of service-affecting packages will be set to this value in the dpkg database. Valid values are "install" and "hold".