Reputation: 41
I've recently been using Docker and researching about how one might ship a dockerized application. If everything was stored in one container (ex: Tomcat, webapp, MySql), it would seem easy to send someone one .tar of the image for them to run. However, most people have been saying to separate your database from your application. So if I wanted to ship an application that required multiple containers, what would be the best method to do so?
Upvotes: 3
Views: 211
Reputation: 510
Check out docker compose. It is designed to specify, spin up, and link multiple containers together.
He is an example config listed on the front page:
web:
build: .
ports:
- "5000:5000"
volumes:
- .:/code
links:
- redis
redis:
image: redis
https://docs.docker.com/compose/
Upvotes: 2