You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docker build -t friendlyname .# Create image using this directory's Dockerfile
docker run -p 4000:80 friendlyname # Run "friendlyname" mapping port 4000 to 80
docker run -d -p 4000:80 friendlyname # Same thing, but in detached mode
docker run -d -p 4000:80 -n containername friendlyname # With the container name
docker run -dit --name apache2 apache2 # Run in the background
docker ps # See a list of all running containers
docker stop <hash># Gracefully stop the specified container
docker start <hash># Gracefully start the specified container
docker ps -a # See a list of all containers, even the ones not running
docker kill<hash># Force shutdown of the specified container
docker rm <hash># Remove the specified container from this machine
docker rm $(docker ps -a -q)# Remove all containers from this machine
docker images -a # Show all images on this machine
docker rmi <imagename># Remove the specified image from this machine
docker rmi $(docker images -q)# Remove all images from this machine
docker login # Log in this CLI session using your Docker credentials
docker tag <image> username/repository:tag # Tag <image> for upload to registry
docker push username/repository:tag # Upload tagged image to registry
docker run username/repository:tag # Run image from a registry
docker exec -i -t containerId bash # Get into the container Jay!
docker run -ti --entrypoint /bin/sh ubuntu # Run a container with a specific image
docker ps -a -q --filter ancestor=headsup-file-monitoring # Stop docker container by name
docker logs 8800331236b5 # Show the container logs using its container ID
docker inspect 73233db4d546 | grep IPAddress # Get the IP address using the container ID
docker start 73233db4d546 # Start a container without passing through all its installation
docker ps -a # It shows all the containers installed in the system