Skip to content

Instantly share code, notes, and snippets.

@abhagsain
Last active September 8, 2019 15:48
Show Gist options
  • Save abhagsain/c9abd6c724120b299dbea0d7277c1cef to your computer and use it in GitHub Desktop.
Save abhagsain/c9abd6c724120b299dbea0d7277c1cef to your computer and use it in GitHub Desktop.
I'll be putting docker commands that I'm learning from the course Docker Mastery

Basic docker commands that I'm learning

  • docker container
    • run --publish 80:80 --detch --name {custom_container_name} nginx
    • ls [list all the running containers]
    • ls -a [list all the containers installed]
    • stop {container_id} {give upto 3 characters of the container} [Stops the running container]
    • rm {container_id} [Remove the stoppped container]
    • rm -f [Remove any container; stopped or running] [Not recommended]
    • top (container_name) [displays the running process of the container]
    • inspect (conatiner_name) [details of the container config]
    • stats Shows the usage of the containers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment