Last active
May 29, 2020 08:00
-
-
Save acerzhou/b1bd69dff08e2acb515a673974da12ed to your computer and use it in GitHub Desktop.
[Docker CMD] docker command #docker #client
This file contains hidden or 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
# Build a docker image with a tag | |
docker build -t <tag> | |
# Pull down asp.net sample app | |
docker pull mcr.microsoft.com/dotnet/core/samples:aspnetapp | |
# List all local docker images | |
docker image list | |
# Run Docker at background | |
docker run -d -p 8080:80 mcr.microsoft.com/dotnet/core/samples:aspnetapp | |
# Run Docker at backgound with name | |
docker run -d -p 8080:80 --name <container_name> <image_name> | |
# Check running container locally | |
docker ps | |
# Check all container (including stopped) locally | |
docker ps -a | |
# Stop the docker | |
docker container stop <dockerId/Name> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment