After installing the docker module , setup is as follows:
To create the Docker hosted repository and install the Docker package, add a single class to the manifest file:
include docker
To configure package sources independently and disable automatically including sources, add the following code to the manifest file:
class { 'docker':
use_upstream_package_source => false,
}
To ensure the module configures the latest repositories, add the following code to the manifest file:
class { 'docker':
version => '17.09.0~ce-0~debian',
}
Docker provides a enterprise addition of the Docker Engine, called Docker EE.
To install Docker EE on RHEL/CentOS:
class { 'docker':
docker_ee => true,
docker_ee_source_location => 'https://<docker_ee_repo_url>',
docker_ee_key_source => 'https://<docker_ee_key_source_url>',
}
For Red Hat Enterprise Linux (RHEL) based distributions, the docker module uses the upstream repositories.
To use the CE packages, add the following code to the manifest file:
class { 'docker':
use_upstream_package_source => false,
repo_opt => '',
}
When setting up TLS, upload the related files (CA certificate, server certificate, and key) and include their paths in the manifest file:
class { 'docker':
tcp_bind => ['tcp://0.0.0.0:2376'],
tls_enable => true,
tls_cacert => '/etc/docker/tls/ca.pem',
tls_cert => '/etc/docker/tls/cert.pem',
tls_key => '/etc/docker/tls/key.pem',
}
To specify which Docker rpm package to install, add the following code to the manifest file:
class { 'docker':
manage_package => true,
use_upstream_package_source => false,
package_engine_name => 'docker-engine'
package_source_location => 'https://get.docker.com/rpm/1.7.0/centos-6/RPMS/x86_64/docker-engine-1.7.0-1.el6.x86_64.rpm',
prerequired_packages => [ 'glibc.i686', 'glibc.x86_64', 'sqlite.i686', 'sqlite.x86_64', 'device-mapper', 'device-mapper-libs', 'device-mapper-event-libs', 'device-mapper-event' ]
}
For more info refer to: https://forge.puppet.com/puppetlabs/docker