Master Docker image management, container networking, storage drivers, and Docker Swarm orchestration through hands-on labs aligned to the Docker Certified Associate (DCA) exam objectives.
Build production-ready Docker skills covering images, registries, networking, storage, and Swarm orchestration.
docker history
nginx:1.25-alpine) instead of :latest for reproducible builds.
registry-url/repository:tag. This tells Docker where to push/pull the image.docker images to see all tags.
docker ps to check.
docker images --filter dangling=true to find untagged images that waste disk space.
&&, use .dockerignore, and choose alpine base images.
Excellent Docker image work!
--link (deprecated).
-v db-data:/path
-d β Run in detached (background) mode--name db-server β Container name (also its DNS hostname)--network app-network β Attach to custom bridge-v db-data:/var/lib/postgresql/data β Mount volume-e POSTGRES_PASSWORD=labpass123 β Set env variable
db-server:5432.
-p 8080:80 publishes container port 80 to host port 8080-p) maps host:container. Only published ports are accessible from outside Docker.
docker network inspect app-network to check membership.
Excellent Docker networking work!
--advertise-addr tells other nodes which IP to use to reach this manager. Use the host's main interface IP.
--opt encrypted flag adds IPsec encryption for data-in-transit security.--opt encrypted in production for security compliance. Without it, traffic between nodes is in clear text.
/run/secrets/<name>. They're never stored on disk on worker nodes.docker inspectdocker secret create db_password ./password.txt) instead of using echo to avoid shell history exposure.
--replicas 3 β Run 3 identical task containers--network prod-overlay β Attach to encrypted overlay--secret db_password β Mount secret at /run/secrets/db_password-p 80:80 β Publish port with routing mesh--update-failure-action rollback in production to auto-rollback if tasks fail during an update.
docker service ps webapp-svc to see individual tasks
Excellent Swarm orchestration work!
This will clear all your progress for this lab including terminal history, completed tasks, and dashboard data. This action cannot be undone.