docker 安裝centos容器(3)
- 2019 年 10 月 6 日
- 筆記
1 docker pull docker.io/tramasoli/centos7-ssh 2 docker run -i -t –name centos7ssh docker.io/tramasoli/centos7-ssh /bin/bash 3 docker commit containerid centos7ssh-images 4 docker run -i -t –name centos7ssh centos7ssh-image /bin/bash 5 docker start centos7ssh 6 docker exec -i -t centos7ssh /bin/bash
容器間鏈接
–link redis:db 可以多個link
–volumes-from 把容器內的所有卷都加入新創建的容器中

image.png