docker-framework
Ansible role that deploys my preferred docker setup that is accessible and writable by multiple users.
yannick
README
Docker Framework
Creates the /docker base directory with proper ownership and permissions.
Key Parameters
| 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 |
Workflow
- Create base directory at configured path
- Set ownership and permissions
- Apply SGID sticky bit (if enabled)
Troubleshooting
Docker containers not visible without sudo
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 -ashows no containers,sudo docker ps -ashows themdocker context lsshows arootlesscontext marked as active (*)docker compose up -dpulls 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.
Repository Statistics
0
Stars
0
Forks
1
Watchers
0
Issues
Default Branch:main
Created:September 3, 2025
Last Updated:March 15, 2026
Repository Size:0.03 KB