Tag Archives: docker

Docker – Essential Commands

CommandsDescription
docker psList all running containers
docker ps -aList all containers stopped, running
docker stop container-idStop the container which is running
docker start container-idStart the container which is stopped
docker restart container-idRestart the container which is running
docker port container-idList port mappings of a specific container
docker rm container-id or nameRemove the stopped container
docker rm -f container-id or nameRemove the running container forcefully
docker pull image-infoPull the image from docker hub repository
docker pull Pull the image from docker hub repository
docker exec -it container-name /bin/shConnect to linux container and execute commands in container
docker rmi image-idRemove the docker image
docker logoutLogout from docker hub
docker login -u username -p passwordLogin to docker hub
docker statsDisplay a live stream of container(s) resource usage statistics
docker top container-id or nameDisplay the running processes of a container
docker versionShow the Docker version information
Advertisement