1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
| docker --help docker-compose --help
docker-compose -f docker-compose.yml up -d
docker-compose -f docker-compose.yml stop
docker-compose down -v
docker-compose -f docker-compose.yml kill && docker-compose -f docker-compose.yml down
printf "nameserver 127.0.1.1\nsearch nvidia.com" > /etc/resolv.conf
* ubuntu:14.04:这是指用 ubuntu:14.04 镜像为基础来启动容器。 * bash:放在镜像名后的是命令,这里我们希望有个交互式 Shell,因此用的是 bash。
docker run -it --rm ubuntu:14.04 bash
docker ps -a 列出所有容器(无论死活)
docker start 34625
docker exec -it 34625 /bin/bash
docker diff 34625759feb9
$ docker commit \ --author "Tao Wang <twang2218@gmail.com>" \ --message "修改了默认网页" \ webserver \ nginx:v2 sha256:07e33465974800ce65751acc279adc6ed2dc5ed4e0838f8b86f0c87aa1795214
docker commit -a "runoob.com" -m "my apache" a404c6c174a2 mymysql:v1
docker exec -it webserver bash
docker run -p 4000:80 friendlyhello
docker run --name web2 -d -p 81:80 nginx:v2
docker build -t friendlyhello .
docker run -i -p 22 -p 8000:80 -m /data:/data -t <foo/live> /bin/bash
docker stop 容器名
docker restart 容器名
docker rm trusting_newton
docker rm $(docker ps -a -q)
docker pull centos
docker pull hub.xiaojukeji.com/mfe/nodejs-v6.10.3:latest
docker port a6f656325a0d
docker rmi ubuntu
docker run -it --security-opt seccomp:unconfined oom:v0.0.1 /bin/bash
docker run -it --security-opt seccomp:unconfined --cap-add=SYS_PTRACE oom:v0.0.1 /bin/bash
docker network prune
|