Question:I have been reading up and learning about Docker, and am trying to correctly choose the Django setup to use. So far there is either:
Docker Compose or Dockerfile
I understand that Dockerfiles are used in Docker Compose, but I am not sure if it is good practice to put everything in one large Dockerfile with multiple
FROMcommands for the different images?
I want to use several different images that include:
If it helps, I am on a Mac, so using boot2docker.
Some issues I’ve had:
- Docker Compose is not compatible with Python3
- I want to containerize my project, so if one large Dockerfile is not ideal, then I feel I’d need to break it up using Docker Compose
- I am OK to make the project Py2 & Py3 compatible, so am leaning towards django-compose
A Dockerfile is a simple text file that contains the commands a user could call to assemble an image.
is a tool for defining and running multi-container Docker applications.
define the services that make up your app in
docker-compose.ymlso they can be run together in an isolated environment.
get an app running in one command by just running
If you have better answer, please add a comment about this, thank you!