After I make any code change, my typical development steps are:
- Change code and build the jar file
- Build docker image that consumes the jar file
- Kill current "docker-compose up" command.
- Run "docker-compose up" again.
My docker-compose file has five services. On step 3, all the containers go down. Ideally, I just need to re-run my app container.
I am looking for a way to do the following in a batch script:
- Bring down the app container. The other four containers should continue to run.
- Build a new docker image
- Force docker-compose to recreate my app container and start it.
For step 1, looks like I can use "docker-compose kill myappname."
Step 2 is also straightforward.
I am wondering how I can accomplish step 3. Thanks.