我是靠谱客的博主 标致西牛,这篇文章主要介绍Linux、Ubuntu下部署docker、tomcat,现在分享给大家,希望可以做个参考。

1、卸载旧版:sudo apt-get remove docker docker-engine docker-ce docker.io

2、更新:sudo apt-get update

3、 sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common

4、添加GPG密钥curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

5、设置stablesudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

6、更新包sudo apt-get update

7、列出可用版本ceapt-cache madison docker-ce

8、安装docker-ce docker-cesudo apt-get install -y docker-ce=<VERSION>不加=安装默认版

9、查看服务是否启动systemctl status docker若未启动运行sudo systemctl start docker

10、运行hello-worldsudo docker run hello-world

安装tomcat
1、查找镜像 sudo docker search tomcat
2、安装sudo docker pull tomcat
3、查看sudo docker images
4、启动sudo docker run -p 8080:8080 tomcat
浏览器上访问即可看到tomcat

未完

最后

以上就是标致西牛最近收集整理的关于Linux、Ubuntu下部署docker、tomcat的全部内容,更多相关Linux、Ubuntu下部署docker、tomcat内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(115)

评论列表共有 0 条评论

立即
投稿
返回
顶部