build&save images
build&save imagesbuild is to create an image from a Dockerfile, compose is to manage many containers. Build a Docker Image from a Dockerfile 1docker build -t my_image . Tag an Image 1docker tag my_image myrepo/my_image:v1 Push an Image to Docker Hub 12docker logindocker push myrepo/my_image:v1 save an image to local computer 1docker save -o my-docker-app.tar my-docker-app load it 1docker load -i my-docker-app.tar docker command line homepageclick here to come back to docker command...
compose
composestart a container from docker-compose 1docker-compose up -d Stop Containers Managed by Compose 1docker -conpose down docker command line homepageclick here to come back to docker command line homepage.
images
imagesdownload and remove images 123sudo docker pull name_imagesudo docker rmi name_imagesudo docker image prune -a // remove all images that not used docker command line homepageclick here to come back to docker command line homepage.
container
containerscheck version and info 12docker --versiondocker info start/stop restart 123sudo systemctl start dockersudo systemctl stop dockersudo systemctl restart docker run a container from images 1sudo docker run -d -p 7890:80 --name container's_name image -d : run in detached mode; -p : port mapping point; —name : specify the container’s name list containers and images 123docker ps //list the containers that runningdocker ps -a //list containers, include the stopsdocker images...
networks
networklist network 1docker network ls create a network 1docker network create my_network Run a Container in a Specific Network 1docker run -d --network=my_network --name my_container name_images docker command line homepageclick here to come back to docker command line homepage.
volumes
volumes&storageslist volumes 1docker volume ls create a volume 1docker volume create my_volume Mount a Volume to a Container 1docker run -d -v my_volume:/app/data --name my_container name_image docker command line homepageclick here to come back to docker command line homepage.



