Skip to content

Instantly share code, notes, and snippets.

@bluerid
Created January 16, 2018 07:01
Show Gist options
  • Save bluerid/0e350271ce668bf1c1f51eca60d7d5c6 to your computer and use it in GitHub Desktop.
Save bluerid/0e350271ce668bf1c1f51eca60d7d5c6 to your computer and use it in GitHub Desktop.
Basic Docker Commands
#Display system-wide information
>_ docker info
#List up Docker Images
>_ docker images
#List up docker images which are intermediary files created during build(s)
>_ docker images -q --filter dangling=true
#List and remove the intermediary files using xargs command
>_ docker images -q --filter dangling=true | xargs docker rmi
#run some image
#docker run --name <container-name> -p <publish and map the container port : host port> <repository-name:tag>
>_ docker run --name server-nginx -p 8081:80 nginx:1.12.2-alpine
#Build an image
#docker build -t <image-name> <path>
>_ docker build -t yandex-translate .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment