PIGSTY

FAQ

frequently asked questions

Who Can Run Docker Commands?

By default, Pigsty adds both the management user running the playbook on the remote host (i.e., the SSH login user) and the user defined by the node_admin_username parameter to the operating-system group docker. Any account in this group can manage Docker via the docker CLI.

Need to grant another user Docker access? Just add that OS user to the docker group:

sudo usermod -aG docker <username>

Working Through a Proxy

During installation, if the proxy_env parameter is set, Pigsty writes the specified HTTP proxy settings to /etc/docker/daemon.json.

Docker will then route all image pulls from upstream registries through this proxy.

Tip: Running the configure playbook with the -x flag automatically captures your current shell's proxy variables and injects them into proxy_env.


Using Mirror Registries

Inside mainland China you may encounter Great Firewall restrictions. Historically, mirrors such as quay.io could be used:

docker login quay.io   # enter your credentials to log in

Update (June 2024): All previously accessible Docker mirrors in China have now been blocked. Please pull images via a proxy.


Adding Docker to Monitoring

When the Docker module is installed, you can register Docker as a Prometheus target for a specific node by running the docker_register (alias register_prometheus) task:

./docker.yml -l <your-node-selector> -t register_prometheus

Software Templates

Pigsty ships a collection of software templates that launch popular stacks with Docker Compose—ready to use out of the box.

Just make sure the Docker module is installed first.