Note_Tech

All technological notes.


Project maintained by simonangel-fong Hosted on GitHub Pages — Theme by mattgraham

Docker

Back


Commands

Container Lifecycle

Command Description
docker create image_name Create a new container, setting up fs snapshot for a container
docker start image_name Start one or more stopped containers, executing startup command
docker run image_name Create and run a new container from an image
docker run image_name command Create and run a new container from an image with default command
docker run -it image_name sh Starts a new shell session after create and run a new container
docker ps List containers
docker stop container_id Stop one or more running containers, sending terminate signal
docker kill container_id Kill one or more running containers, sending sigkill signal
docker system prune Remove all unused containers, networks, images
docker logs container_id RFetch the logs of a container

Hands-on