This formula installs and configures Docker.
Install docker, configure daemon.json according to the information in Salt pillar.
See pillar.example for configuration options.
Setup a systemd timer that cleans up unused and dangling images every night by running
docker system prune --force --all automatically.
Install docker-compose package.
This state configures Docker and Swarm. It defaults to use the interface eth0 for internal communication.
The interface can be adjusted using the Pillar:
docker:
swarm:
interface: ens3# Bootstrap the cluster
sudo salt-run state.orch docker.orch.bootstrap-swarm pillar='{"leader": "$leader", "nodes": ["$2nd_node", "3rd_node"]}'