Skip to content

Instantly share code, notes, and snippets.

@dotku
Last active October 23, 2019 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dotku/c2bd7654299099a7ee7a2d9524c99d14 to your computer and use it in GitHub Desktop.
Save dotku/c2bd7654299099a7ee7a2d9524c99d14 to your computer and use it in GitHub Desktop.
Docker

Common Docker Commands

  1. Create Docker Container from image

    docker run -it -d --rm --name CONTAINER_NAME IMAGE_NAME

  2. Check container running status

    docker ps

  3. Loging to Container and check the status

    docker exec -it CONTAINER_ID bash

  4. Get Network IP

    docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' IMAGE_NAME

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment