docker learning record

start the container

docker run -i -t -v /root/software/:/mnt/software/ 25c5298b1a36 /bin/bash

 

-i: Indicates running the container in "interactive mode"
-t: Indicates that the container will enter its command line after startup
-v: Indicates which local directory needs to be mounted to the container, format: -v <host directory>:<container Catalog>

 

delete all running containers

sudo docker rm $(docker ps -a -q)

 

into the container

docker exec -it test01 bash # You can also use the exec command to enter the container

 

curl -fsSLO https://get.docker.com/builds/Linux/x86_64/docker-1.12.3.tgz && tar --strip-components=1 -xvzf docker-1.12.3.tgz -C /usr/local/bin

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326985883&siteId=291194637