title: How to update existing images with docker-compose?
body: <p>I have multiple microservices and I am using docker-compose for development deployments. When there are some changes in the microservices code base, I am triggering ci job to re-deploy them. I have below script to do this. But each time I have to build all images from scratch, then run them. After all of this operation, I have <code>anonymous</code> images. So I am using the last script to remove them. What you would suggest making this process more practical? Is there any way to update an existing image without removing it with new changes?</p>
  
  <pre><code>- docker-compose build
  - docker-compose down
  - docker-compose up -d --force-recreate
  - docker rmi $(docker images -f "dangling=true" -q) -f
  </code></pre>
  
  <p>Additional info: i am using <code>gitlab-ci</code></p>