[英]Google Jib with docker-compose application, Fast way to restart application after rebuild image to Docker daemon
I Am using com.google.cloud.tools.jib
version 3.2.1
in my spring boot Gradle build file.我在我的 spring 启动 Gradle 构建文件中使用com.google.cloud.tools.jib
版本3.2.1
。
The repo I am working with has to be run in a docker-compose application as it will only work if there are other services sharing info with it.我正在使用的 repo 必须在 docker-compose 应用程序中运行,因为它只有在有其他服务与之共享信息时才能工作。
Am updating the code to add authentication, But that's not the issue here.我正在更新代码以添加身份验证,但这不是这里的问题。
When ever I update anything, My process is as follow:每当我更新任何内容时,我的流程如下:
Question : Is there a smoother/faster way to do this kind of process, I mean without turning off the docker-compose application down and up with every single update?问题:有没有一种更流畅/更快的方法来完成这种过程,我的意思是每次更新都不会关闭 docker-compose 应用程序?
I was thinking about something like turning my service down and then up, As a single service.我正在考虑将我的服务关闭然后再打开,作为一个单一的服务。 But I found nothing.但我什么也没找到。
Have a look at docker-compose up --help
:看看docker-compose up --help
:
If you want to force Compose to stop and recreate all containers, use the
--force-recreate
flag.如果要强制 Compose 停止并重新创建所有容器,请使用--force-recreate
标志。
So, docker-compose up --force-recreate
will allow you to recreate the containers without doing a docker-compose down
which will also remove networks.因此, docker-compose up --force-recreate
将允许您在不执行docker-compose down
的情况下重新创建容器,这也将删除网络。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.