docker version
docker images
docker pull <image name>
//Eg: docker pull mysql
-it
- For interactive environment-d
- To run in detached mode-p <Host port:container port>
- To forward the port
E.g.- docker run -d -p 8080:80 nginx
docker run <image_name>
// E.g - docker run hello-world
docker ps
docker container ls
docker exec -it <container_id> bash
docker ps -a
docker container prune -f
docker logs <container-id/name>
docker start <container-id/name>
docker stop <container-id/name>
docker rm <container-id/name>
docker rmi <image-name> -f
docker commit -m "commit message" <container-id> <imagen-name:version>
// E.g - docker commit -m "added name.txt file" a17b78de1961 name_ubuntu:1.01
docker images -q
docker rmi $(docker images -q)
step 1 - create Docker file (and write comand)
step 2 - docker build -t <image-name:verison> <path of docker file>
step 3 - docker run <image-name>
# First download the script
step 1 - curl -fsSL https://raw.githubusercontent.com/docker/scout-cli/main/install.sh -o install-scout.sh
# Second run the script
step 2 - sh install-scout.sh
# Now Scout is install you can check your Scout version
step 3 - docker scout verison