๐ฏ Objective
Quick reference for:
Image tagging
Image creation & deletion
Network creation & deletion
Running containers with volume & port mapping
# ๐ท๏ธ Docker Tag (Image Re-tagging)
๐ง Concept
Create a new tag for an existing image (no duplication)
โ๏ธ Command
plain text
docker tag <source_image>:<tag> <target_image>:<tag>๐ Example
plain text
docker tag app:latest app:custom# ๐ฆ Docker Image Creation
๐ง Concept
Create image from a container snapshot
โ๏ธ Command
plain text
docker commit <container_name> <image_name>:<tag># ๐๏ธ Docker Image Deletion
โ๏ธ Command
plain text
docker rmi <image_name>:<tag>โ ๏ธ If in use
plain text
docker rm -f <container_name>
docker rmi <image_name>:<tag># ๐ Docker Network Creation
๐ง Concept
Custom network for container communication
โ๏ธ Command
plain text
docker network create \
--driver bridge \
--subnet <subnet> \
--gateway <gateway> \
<network_name># ๐๏ธ Docker Network Deletion
โ๏ธ Command
plain text
docker network rm <network_name>โ ๏ธ If in use
plain text
docker network disconnect <network_name> <container_name>
docker network rm <network_name># ๐ Run Container (Volume + Port Mapping)
๐ง Concept
vย โ host โ container file sync
pย โ expose container service
โ๏ธ Command
plain text
docker run-d \
--name <container_name> \
-p <host_port>:<container_port> \
-v <host_path>:<container_path> \
<image_name>:<tag>๐ Verify
plain text
docker ps
docker inspect <container_name> | grep -A 10 Mounts
docker port <container_name>
curl http://localhost:<host_port>/# ๐งช Validation Checklist
[ ] Image tagged correctly
[ ] Image created from container
[ ] Image deleted successfully
[ ] Network created with correct subnet
[ ] Network deleted properly
[ ] Container running with correct port mapping
[ ] Volume mapping working
[ ] Service accessible via curl