首页 > 代码库 > docker搭建基础的tomcat应用
docker搭建基础的tomcat应用
tomcat server是眼下比較流行的开源中间件server,以下介绍怎样使用 docker 来做一个 tomcat 数据库服务。官方的仓里没有标 OFFICIAL 的 tomcat 的镜像,只是 「tutum」的镜像做的很好,我们能够直接 pull 他们的镜像来完毕我们的操作。
core@localhost ~/base $ docker pull tutum/tomcat:8.0
Pulling repository tutum/tomcat
866eb07a675e: Download complete
511136ea3c5a: Download complete
1c9383292a8f: Download complete
9942dd43ff21: Download complete
d92c3c92fa73: Download complete
0ea0d582fd90: Download complete
cc58e55aa5a5: Download complete
c4ff7513909d: Download complete
3e9890d3403b: Download complete
b9192a10c580: Download complete
28e5e6a80860: Download complete
2128079f9b8f: Download complete
2fdb535bb227: Download complete
af938f214bc9: Download complete
6229ba3a34a8: Download complete
960d19d6cec3: Download complete
5e29a9c87494: Download complete
06466c9ca44e: Download complete
99cabf3c3503: Download complete
d9d23662e1ab: Download complete
c2f8acd8560d: Download complete
e57060590015: Download complete
core@localhost ~/base $ docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
base/163 latest 468d347c06bc 22 hours ago 249.1 MB
test/supervisord latest 468d347c06bc 22 hours ago 249.1 MB
dl.dockerpool.com:5000/ubuntu 14.04 1357f421be38 4 days ago 192.7 MB
ubuntu 14.04 1357f421be38 4 days ago 192.7 MB
dl.dockerpool.com:5000/mysql 5.7 e95cbb9f48ea 6 days ago 258.6 MB
mysql 5.7 e95cbb9f48ea 6 days ago 258.6 MB
mysql latest 9a09222edf60 6 days ago 235.6 MB
tutum/tomcat 8.0 866eb07a675e 6 weeks ago 539.4 MB
core@localhost ~/base $ docker run -d -p 80:8080 tutum/tomcat:8.0
5a02ce457c875638bdc5a460206798cc12c3b8633a754a8745e6d1eda136ac99
core@localhost ~/base $ docker logs 5a0
=> Creating and admin user with a random password in Tomcat
=> Done!
========================================================================
You can now configure to this Tomcat server using:
admin:LfI5jMu2J8ZO
========================================================================
#从 logs 中能够看到tomcat的username与password
...
这样我们的tomcat服务就启动了
很多其它内容请关注 http://www.dockerpool.com
docker搭建基础的tomcat应用
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。