Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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