Last active
November 30, 2021 08:00
-
-
Save kevinyan815/ec1c901f0887d3a40b58c1b020bd29a0 to your computer and use it in GitHub Desktop.
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
## docker login to platform other than dockerhub | |
docker login [email protected] registry.cn-hangzhou.aliyuncs.com | |
## dockcer build | |
docker build -t registry.cn-hangzhou.aliyuncs.com/docker-study-lab/continuous_profiling:v0.2 . | |
## docker push | |
docker push registry.cn-hangzhou.aliyuncs.com/docker-study-lab/continuous_profiling:v0.2 | |
## docker run | |
docker run --name go-profile-demo -v /tmp:/tmp -p 8080:3000 --rm registry.cn-hangzhou.aliyuncs.com/docker-study-lab/continuous_profiling:v0.2 | |
// --name for container alias, -p for port host port and container port mapping, | |
// -v for volume host volume and container volume mapping, | |
// --rm for delete container after container stopped | |
## show docker containers | |
docker container ls | |
## bash in container | |
docker exec -it containerid/container_name /bin/sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment