/
/
Ansible role that deploys my preferred docker setup that is accessible and writable by multiple users.
Creates the /docker base directory with proper ownership and permissions.
| Variable | Default | Description |
|---|---|---|
docker_framework_base_path |
/docker |
Root directory for all Docker Compose services |
docker_framework_owner |
ansible |
Directory owner |
docker_framework_group |
users |
Directory group |
docker_framework_mode |
0775 |
Directory permissions |
docker_framework_sgid |
true |
Set SGID bit so new files inherit group ownership |
If docker ps shows nothing but sudo docker ps shows running containers, the user likely has a rootless Docker daemon running alongside the system daemon. Each daemon has its own containers and images.
Symptoms:
docker ps -a shows no containers, sudo docker ps -a shows themdocker context ls shows a rootless context marked as active (*)docker compose up -d pulls images fresh (even though they exist under the system daemon)Fix:
# Stop and disable the rootless docker daemon
systemctl --user disable --now docker.service
# Switch to the system docker context
docker context use default
# Remove the rootless context
docker context rm rootless
After this, docker ps will talk to the system daemon where Ansible deploys containers.