Skip to main content

Posts

Showing posts from October, 2020

Cheatsheet: Docker

  version check          docker version Create a container — setup File System Snapshot to be used docker create <image-name> Start a container — Executes startup command        -a - will show you all the logs/info coming out of the container  docker start -a <container-ID> run a docker container from image — Create + Start docker run <image-name> Default command override docker run <image-name> <override-command> Eg: "docker run busybox ls” List all running containers docker ps List all containers ever created docker ps --all Remove stopped containers      — have to redownload images  docker system prune   Logs from container docker logs <container-ID> Stop a container  — A hardware signal “SIGTERM" is sent to process, this gives time for program to clean-up and shut down — If container doesn’t stop in 10 secs after issuing SIGTERM, then do...