Configure
Pigsty includes built-in Docker support, allowing you to quickly deploy containerized applications.
Quick Start
To install docker on nodes, set the docker_enabled parameter to true.
Then run the docker.yml playbook (on target hosts/groups):
Docker will be installed on that infra group.
Registry
You can specify docker registry mirrors with docker_registry_mirrors:
Here are some example registry mirrors:
- Alibaba Cloud:
["https://registry.cn-hangzhou.aliyuncs.com"] - Tencent Cloud:
["https://ccr.ccs.tencentyun.com"] - DaoCloud:
["https://docker.m.daocloud.io"] - 1Ms:
["https://docker.1ms.run"]
You can specify multiple registry mirrors as an array, remember to quote the URL with ".
Proxy
Docker will use the proxy_env parameter if specified.
You can define it on global parameters all.vars or dedicate groups (such as infra ):
It will be rendered to /etc/docker/daemon.json during the docker_config task:
This is useful if direct network access is blocked due to various reasons.
Images
You can provision docker images with docker_image and docker_image_cache:
The images defined in docker_image will be pulled during the docker_image task, one by one.
And the local docker image cache with .tgz suffix matching the docker_image_cache glob list will be loaded into docker with docker load
Accelerate
You can use accelerators on each cloud vendors: