运维开发网

ubuntu安装docker-ce

运维开发网 https://www.qedev.com 2020-01-30 20:41 出处:网络 作者:doubf
1.卸载现有docker:apt-getremovedockerdocker-enginedocker.io2.安装:apt-getinstall\apt-transport-https\ca-certificates\curl\software-properties-common3.curl-fsSLhttps://download.docker.com/linux/ubuntu/gpg|sud
1.卸载现有docker:apt-get remove docker docker-engine docker.io
2.安装:apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common
3.curl -fsSL https://download.docker.com/Linux/ubuntu/gpg | sudo apt-key add - 
4.apt-key fingerprint 0EBFCD88
5.add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/Linux/ubuntu \
   $(lsb_release -cs) \
   stable"
6.apt-get update
7.apt-get install docker-ce

备注:

自定义网络

docker network create --subnet 10.136.22.0/24 cnpro

查看创建的网桥

docker network ls

常见docker使用:

docker run -d --name test \
--privileged --restart=always \
--net uspro --ip 172.31.3.11 \
-v /opt/app/test:/usr/local/tomcat/webapps/ROOT \
-v /opt/app/logs/test:/usr/local/tomcat/logs \
-v /storage:/storage \
-p 8081:8080 \
tomcat:8.0

参考官网:https://docs.docker.com/install/Linux/docker-ce/ubuntu/#docker-ee-customers

0

精彩评论

暂无评论...
验证码 换一张
取 消