Version v2.7.0 of the documentation is no longer actively maintained. The site that you are currently viewing is an archived snapshot. For up-to-date documentation, see the latest version.
Module: DOCKER
Deploy docker on Pigsty managed nodes: Configuration | Administration | Playbook | Dashboard | Parameter
Concept
Docker is a popular container service which provides standardize software deliver solution.
Configuration
Docker module is different from other modules, which does not require pre-configuration to install & enable.
Just run the docker.yml playbook on any Pigsty managed node.
But if you wish to add docker daemon as prometheus monitoring target, you have to specify the docker_enabled parameters on those nodes.
Administration
Using Mirrors
Consider using docker mirror registry, log in with:
Monitoring
Docker monitoring is part ot NODE module’s responsibility, to register docker target to prometheus.
You have to define docker_enabled on nodes, then re-register them with:
Compose Template
Pigsty has a series of built-in docker compose templates.
Playbook
There’s one playbook to install docker on designated node:
docker.yml: install docker daemon.
docker.yml
The playbook docker.yml will install docker for the given node.
Subtasks of this playbook:
- docker_install : install docker on nodes
- docker_admin : add user to docker admin group
- docker_config : generate docker daemon config
- docker_launch : launch docker daemon systemd service
- docker_image : load docker images from /tmp/docker/*.tgz if exists
Parameter
There are 4 parameters about DOCKER module.
| Parameter | Section | Type | Level | Comment |
|---|---|---|---|---|
docker_enabled |
DOCKER |
bool | C | enable docker on this node? |
docker_cgroups_driver |
DOCKER |
enum | C | docker cgroup fs driver: cgroupfs,systemd |
docker_registry_mirrors |
DOCKER |
string[] | C | docker registry mirror list |
docker_image_cache |
DOCKER |
path | C | docker image cache dir, /tmp/docker by default |