text Docker有用的命令

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text Docker有用的命令相关的知识,希望对你有一定的参考价值。

shopws all docker images on your machine
docker images

Start the build for installing this docker image
docker build -t mongodb-xdb:v1 .

remove docker image from your machine
docker rmi 135a79342ba1

remove docker image session from your machine
docker rm 135a79342ba1

Status of running sessions of docker images
docker ps -a

Stop an instance of docker image
docker stop 4aa7fd591198

Run a new instance of docker image
docker run -d -p 8001:27017 mongodb-xdb:v1

Shows help info for the docker file
type .\build_docker.bat

find session logs
docker logs -f 35a42e013000

Pull an image from Docker hub
docker pull 10.38.11.73:5000/bunnings/redis:v1

Push an image from Docker hub
docker push 10.38.11.73:5000/bunnings/redis:v1

Docker Exec to trigger a executable code in the container. Below line triggers a PS1 file in container
docker exec CONTAINER-NAME powershell "$mountPath\bootstrap-website-databases.ps1"
docker exec CONTAINER-NAME powershell -Command "dir 'c:/Program Files (x86)/MSBUILD/Microsoft'"

Copy data from your local folder to docker Image by DockerFile
COPY ["MSBUILD", "C:/Program Files (x86)/MSBUILD"]
COPY ["././bootstrap-website-iis.ps1", "C:/temp/bootstrap-website-iis.ps1"]

以上是关于text Docker有用的命令的主要内容,如果未能解决你的问题,请参考以下文章

markdown Docker提示和技巧 - 有用的命令

markdown Docker有用的命令

sh Docker有用的命令

text 有用的命令行命令

text Nginx有用的命令

text 有用的命令