docker-compose


How to only restart one service in docker


I am trying to start 3 services in docker-compose.yml
service1:
image: <image-for service1>
service2:
image: <image-for service1>
tomcatservice:
image: tomcat:8.0.20-jre8
depends_on:
- service1
- service2
volumes:
- ./target/myapp.war:/usr/local/tomcat/webapp/myapp.war
expose:
- "8080"
links:
- service1
- service2
this i am want to restart only tomcatservice with:
latest maven build of my app code
no changes in other 2 services so nothing needs to be done for them
Once you've updated ./target/myapp.war, you just need to docker-compose restart tomcatservice to restart the service.
If you have changed the service at all in docker-compose.yml, you can instead do docker-compose up -d tomcatservice to rebuild it and restart it.

Related Links

Azure Container Service: Update Docker-Compose?
Docker compose: doesnt allow to use constraints if you have a env variable set
How to use visual studio docker function on Windows Home edition?
Passing arguments to docker compose file when using it for swarm
How to run ad hoc docker compose commands in Ansible?
Using custom hostnames for docker local development containers
Changing the network name?
Let external container know about subnets created by multiple docker-compose projects
How to monitor / discover more docker containers with prometheus
two docker-compose .yml in the same network with COMPOSE_PROJECT_NAME
docker compose 3.1(swarm), secrets, ssl and nginx
What is the version directive for?
How to run docker-compose up -d at system start up?
In Docker Compose can I have services exiting
Docker compose - secrets Additional property secrets is not allowed
docker-compose mounted volume remain

Categories

HOME
spring-boot
ssms
ns2
network-programming
service
ldap
c++builder
watson-iot
crm
perl6
docker-compose
zabbix
phpexcel
runtime
http-status-codes
repeater
caldav
jq
custom-component
monad-transformers
ejb-3.1
rollupjs
jmsserializerbundle
imdb
flickr
webspeech-api
tunnel
flex3
perf
iterm2
google-cloud-powershell
jquery-ui-slider
flume-ng
amazon-rds-aurora
npoco
yank
spring-cloud-bus
extjs3
visio-2010
audio-fingerprinting
sharpssh
jtextarea
robotc
group
nls
therubyracer
lattice
geokit
weblogic-maven-plugin
python-rq
salesforce-service-cloud
skbio
fadein
ewam
clear
windows-phone-8-emulator
vanilla-forums
jsoncpp
cloud-storage
eaaccessory
nmock
tinymce-plugins
stderr
minko
cordova-3
random-access
system.io.packaging
lwuit
ios-enterprise
atg-dynamo
android-relativelayout
windows-phone-store
boofcv
facebook-likebox
ojb
extensibility
mandelbrot
pageload
boost.build
libx264
gssapi
orchestration
motordriver
doxia
waveout
socketasynceventargs
motorola-droid
wdm
functional-specifications
glassfish-embedded
helios
zend-acl
tracd

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App