当前位置:网站首页>Jenkins自动化部署,连接不到所依赖的服务【已解决】
Jenkins自动化部署,连接不到所依赖的服务【已解决】
2022-06-24 07:05:00 【Falling the bowie】
前言:Docker网络问题
如果之前使用的是Docker Compose启动所有依赖服务,会默认创建一个网络,所有的依赖服务都会在此网络之中,不同网络内的服务无法互相访问。我这里创建的网络是deploy_default,所以需要指定sh脚本中服务运行的的网络,否则启动的应用服务会无法连接到依赖服务。
- 使用
docker inspect mysql命令来查看mysql服务所在的网络;

- 通过
docker network ls来查看所有网络;

- 修改所有
sh脚本,修改服务运行的网络,添加一行--network deploy_default \即可。
注意不要在命令行附近加 "#"号开头的注释,会出现找不到--network命令错误。
边栏推荐
- 解析互联网广告术语 CPM、CPC、CPA、CPS、CPL、CPR 是什么意思
- mysql组合索引的有序性
- js中通过key查找和更新对象中指定值的方法
- 利用ngrok做内网穿透
- Micro build low code online "quick registration applet" capability
- leetcode 1268. Search Suggestions System(搜索推荐系统)
- Vscode install the remote -wsl plug-in to connect to the local WSL
- Review SGI STL secondary space configurator (internal storage pool) | notes for personal use
- (pkcs1) RSA public private key PEM file parsing
- How to mount a USB hard disk with NTFS file format under RHEL5 system
猜你喜欢

2022 tea artist (intermediate) work license question bank and online simulation examination

Qt导出PDF文件的两种方法

2022 mobile crane driver special operation certificate examination question bank and online simulation examination

How to improve the customer retention rate in the operation of independent stations? Customer segmentation is very important!

Maya re deployment

Redis的Cluster集群数据倾斜

ZUCC_编译语言原理与编译_实验08 语法分析 LR 分析
![[untitled]](/img/94/792e8363dbfe67770e93b0dcdc8e72.png)
[untitled]
![[explain the difference between operation and maintenance and network engineering]](/img/2b/945f468588e729336e2e973e777623.jpg)
[explain the difference between operation and maintenance and network engineering]

2021-03-04 comp9021 class 6 notes
随机推荐
mysql组合索引的有序性
2022 mobile crane driver special operation certificate examination question bank and online simulation examination
Take my brother to do the project. It's cold
Matlab求解线性方程组Ax=b
Shell pass parameters
[explain the difference between operation and maintenance and network engineering]
Longhorn installation and use
Base64编码详解及其变种(解决加号在URL变空格问题)
Shell basic operators -- relational operators
ZUCC_编译语言原理与编译_实验04 语言与文法
2021-03-11 comp9021 class 8 notes
[xinliu-s6 new model +sa 3-star Xinghai] the new two-way server of the third generation chip was launched and the product was updated~
JS to get the last element of the array
提高INSERT速度
OpenCV to realize the basic transformation of image
PHP代码加密的几种方案
Paper notes: multi label learning dm2l
获取屏幕宽高工具类
数据平台简介
jwt(json web token)