Skip to content

Instantly share code, notes, and snippets.

@okanmenevseoglu
Last active August 3, 2020 21:21
Show Gist options
  • Save okanmenevseoglu/7ef4ff4e6cd855178cbbe7223026209a to your computer and use it in GitHub Desktop.
Save okanmenevseoglu/7ef4ff4e6cd855178cbbe7223026209a to your computer and use it in GitHub Desktop.
Docker Commands
// Pull and image from a repository.
docker pull <repository-image-url>:<tag>
// Run an image with a bash shell.
docker run -it <image-name or image url>:<tag> /bin/bash
// Mount a volume to an image and run it
docker run -v <host-volume>:<docker-volume> <image-name or image url>:<tag>
// Connect to a running container
docker exec -it <image> /bin/bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment