Created
June 2, 2019 08:45
-
-
Save asalhani/b415d10864a83bfdc385c990247a7f4a to your computer and use it in GitHub Desktop.
Docker Commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# list images | |
docker image ls | |
# build image from Dockerfile | |
docker image build -t "<name>:latest" <dockerfile_path> | |
ex: | |
docker image build -t "custom-ubu" Dockerfile | |
# remove image | |
docker image rm <image_name> | |
ex: | |
docker image rm custom-ubu | |
# run container from image | |
docker run -i -d -it custom-ubu | |
# attach to bash of running container | |
docker attach <container_name_or_id> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment