Docker
Docker is an open-source platform for building, shipping, and running applications in containers. This image provides a clean Ubuntu 24.04 environment with Docker CE and Docker Compose pre-installed, ready for you to deploy any containerised workload.
Software included
Section titled “Software included”| Component | Version |
|---|---|
| Docker CE | Latest stable |
| Docker Compose plugin | Latest stable |
| Ubuntu | 24.04 LTS |
Getting started
Section titled “Getting started”1. Connect to your VM
Section titled “1. Connect to your VM”ssh ubuntu@<your-vm-ip>2. Verify Docker is running
Section titled “2. Verify Docker is running”There is no first-boot configuration. Docker starts immediately after the VM boots.
docker versiondocker compose versionThe ubuntu user is pre-added to the docker group, so you can run Docker commands without sudo.
3. Run your first container
Section titled “3. Run your first container”docker run --rm hello-world4. Deploy with Docker Compose
Section titled “4. Deploy with Docker Compose”Create a docker-compose.yml file and bring up your stack:
docker compose up -dManaging Docker
Section titled “Managing Docker”# List running containersdocker ps
# View logs for a containerdocker logs <container-name> -f
# Stop a containerdocker stop <container-name>
# Pull the latest imagedocker pull <image-name># Check Docker service statussystemctl status docker
# Restart Dockersudo systemctl restart dockerDocker log files are limited to 10 MB per file with a maximum of 3 rotated files to prevent disk exhaustion.
Security
Section titled “Security”UFW is not enabled by default in the Docker marketplace image.
The ZCP firewall and port-forwarding rules remain part of exposure control. Before you expose application ports, enable and configure UFW or another host firewall. To use UFW, allow SSH before you enable it:
sudo ufw allow 22/tcpsudo ufw enablesudo ufw statusWhen you publish container ports with -p or ports: in Compose, Docker manages its own iptables
rules. These rules can bypass UFW, so do not rely on UFW alone to restrict a published port.
To make a published port available only on the VM, bind it to the loopback interface:
docker run -p 127.0.0.1:80:80 <image>Or in docker-compose.yml:
ports: - '127.0.0.1:80:80'