I would like to update a container in my docker-compose file: E.g. from sharelatex 0.2 to v0.3.10. How can I do this without loosing the other containers and their data? Is it also possible to create a backup of the current container and switch back to it if the update fails?
My current docker-compse file:
version: '2'
services:
sharelatex:
restart: always
image: sharelatex/sharelatex:0.20
container_name: sharelatex
depends_on:
- mongo
- redis
privileged: true
ports:
- 80:80
links:
- mongo
- redis
volumes:
- ~/sharelatex_data:/var/lib/sharelatex
environment:
SHARELATEX_MONGO_URL: mongodb://mongo/sharelatex
SHARELATEX_REDIS_HOST: redis
SHARELATEX_APP_NAME: 'Our ShareLaTeX'
mongo:
restart: always
image: mongo
container_name: mongo
expose:
- 27017
volumes:
- ~/mongo_data:/data/db
redis:
restart: always
image: redis
container_name: redis
expose:
- 6379
volumes:
- ~/redis_data:/data