Created
January 12, 2018 22:06
-
-
Save niraj-shah/9f660ee8a15f9908836baca30fc5a48f to your computer and use it in GitHub Desktop.
Docker Usage and Examples
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
# get list of docker images | |
docker images | |
# build docker image | |
docker build -t <repo>/<name>:<version> ./path/to/directory | |
# example: docker build -t nirajshah/php7:v0.3 . | |
# run a command in container | |
docker run <img_id> <command> | |
# example: docker run bbd53c8ffa96 php -v | |
# push image to docker & publish | |
docker push <repo>/<name>:<version> | |
# example: docker push nirajshah/php7:v0.3 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment