Docker镜像官网地址:https://hub.docker.com/
第一步:查看本地环境镜像
docker images
第二步“:搜索Nginx镜像
docker search nginx
第三步:拉取nginx镜像,默认下载最新版本
docker pull nginx
第四步:后台启动 nginx
docker run -d --name nginx01 -p:3344:80 nginx
第五步:测试
curl localhost:3344
http://IP:3344/
第六步:进入容器
docker exec -it nginx01 /bin/bash
第一步:搜索容器
docker search tomcat
第二步:拉取tomcat镜像,默认下载最新版本
docker pull tomcat
第四步:后台启动 tomcat
docker run -d --name tomcat01 -p:3355:8080 tomcat
第五步:进入容器,默认webaps下没有文件,文件都在webapps.dist
docker exec -it tomcat01 /bin/bash
拷贝文件到webapps
cp -r webapps.dist/* webapps
第六步:测试
curl localhost:3355
搜索对应的镜像
对应的版本信息和安装方法
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有