Docker Cheat Sheet

Restart Terminated Container

  • Run docker ps -a to get previously run containers
  • Run docker start {container code} to run container

Check Container Log Output

  • Run docker inspect to get any possible log locations
  • Run docker exec -it {container code} {shell} to attempt to access non-mounted logs
  • Run docker attach {container code} to view any standard log output (NOTE: hitting Ctrl+C will terminate the instance)

Leave a Reply