Skip to content
- To display list of docker container
- To start the service of docker
- to get the list of docker images
- To pull the docker images like docker pull <image-name:tag-no>
docker pull tomcat:latest
- To create the docker container from docker tomcat image
docker run —name tomcat-container -p 8080:8080 tomcat:latest
- To get the list of container those are in stopped/running stages
- To remove the docker container with the help of docker container id
docker rm <container -id>
- To create the docker container from docker tomcat image – It’s in detach mode
docker run -d —name tomcat-container -p 8080:8080 tomcat:latest
- To stop the docker container
docker stop <container-id>
- To login into the docker and go inside to check the issue of docker access from browser
docker exec -it tomcat-container /bin/bash
docker exec -it <container-id> /bin/bash
- To create docker image with the help of Dockerfile
docker build -t devops-project
- To remove the docker image
- If you want docker will on boot on your machine automatically:
docker chkconfig docker on
- Remove all unused containers, networks, images (both dangling and unreferenced), and optionally, volumes.