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

Race conditions after changing names in docker-compose.yml
Docker compose - image not found
How to work out the hostname that compose gives containers?
docker-compose restart container if service is dead
Swarm scheduling not working as expected using filters in compose file
issues in buiding Slate with Docker
Invalid type error in Docker Compose
Django cookiecutter with Docker add pip package
Docker Compose + Swarm + Machine Networking issue
docker-compose build image parameters --force-rm --pull
linking 2 containers through docker compose
Files created by manage.py commands not chown'd from root user
Is it possible to create an intermediate image within docker-compose?
docker-compose service listen on specified interface
Does Docker-Compose allow overwriting of ports when using extends?
Jhipster Docker-compose conflict

Categories

HOME
airflow
formatting
display
windows-server-2008
python-requests
opc-ua
kendo-asp.net-mvc
adroitlogic
mongodb-replica-set
dat.gui
cherrypy
klipfolio
oracle-golden-gate
apdu
windows-mobile
workflow-foundation
mex
scripting-language
setup-project
request-uri
ds-5
andengine
intermec
boost-log
ios-autolayout
favorites
traitsui
lighting
device-driver
scip
anypoint-studio
motion
origami
jslider
compiled-query
jquery-ui-slider
smooth-streaming
bootstrap-carousel
codepen
weld
togglebutton
google-chrome-storage
import.io
ng-class
riemann
jscoverage
perldoc
enet
nservicebus6
r-commander
kendo-scheduler
disassembly
scanf
csc
django-celery
camellia
cexception
calc
video-embedding
apache2-module
askbot
eaaccessory
pagecontrol
xml-simple
eggplant
firewire
clearquest
web-standards
data-representation
asp.net-2.0
aiff
fedena
unityvs
system.net
nspopupbutton
banana-pi
lettuce
iwork
xml-validation
jfilechooser
myrrix
android-library
auctex
microsoft-speech-platform
nsregularexpression
quit
configurationsection
cryptarithmetic-puzzle
big-endian
django-admin-tools
mysql-connector
jqueryi-ui-buttonset
xpolog
youtube.net-api
n2
cpack
nscharacterset
silverlight-2.0
konsole
dojox.gfx
ironpython-studio

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