Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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.

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.

Am updating the code to add authentication, But that’s not the issue here.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

When ever I update anything, My process is as follow :

  1. Update Code.
  2. Gradle jibDockerBuild # to build to a Docker daemon
  3. docker-compose down # to stop and remove old application
  4. docker-compose up # to start the application with new services updated

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?

I was thinking about something like turning my service down and then up, As a single service. But I found nothing.

>Solution :

Have a look at docker-compose up --help:

If you want to force Compose to stop and recreate all containers, use the
--force-recreate flag.

So, docker-compose up --force-recreate will allow you to recreate the containers without doing a docker-compose down which will also remove networks.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading