温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

ubuntu安装docker-ce

发布时间:2020-02-27 06:04:17 来源:网络 阅读:94 作者:doubf 栏目:系统运维
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

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI