springboot(25)Docker部署

序言

 

docker build -t springboot .

docker run  --name springboot -d -p 8080:8080 springboot

sudo docker run springboot

http://192.168.229.133:8080/home/index

 

docker-machine ip 192.168.229.133

 

http://192.168.229.133:8080/info

 

yum install net-tools

netstart -anp|grep 8080

 

docker rm -f springboot

docker ps -a

docker inspect springboot

 

docker run -di --name 容器名称 -p 8080:8080 镜像名称

docker logs -f --tail=100 springboot

docker run -d -p 8080:8080 springboot

防火墙

启动: systemctl start firewalld

关闭: systemctl stop firewalld

查看状态: systemctl status firewalld

开机禁用 : systemctl disable firewalld

开机启用 : systemctl enable firewalld

那怎么开启一个端口呢

添加(--permanent永久生效,没有此参数重启后失效)

firewall-cmd --zone=public --add-port=8080/tcp --permanent 

重新载入

firewall-cmd --reload

查看

firewall-cmd --zone= public --query-port=8080/tcp

删除

firewall-cmd --zone= public --remove-port=8080/tcp --permanent

资料

posted @   ~沐风  阅读(33)  评论(0编辑  收藏  举报
编辑推荐:
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!
历史上的今天:
2020-12-26 Vue.js入门(15)Gallery
2019-12-26 KMP搜索算法

喜欢请打赏

扫描二维码打赏

了解更多

点击右上角即可分享
微信分享提示