How to use docker-compose with mix_docker?

One of the things docker gives us and I like is a way to make prod and dev environments even closer.

docker-compose is very cool tool to build a complex environment on dev env.

On the other hand, mix_docker is a good tool for deploying lean docker images for production.

Is there a way to make them work together seamlessly?

For what I’ve studied, mix_docker is a prod oriented tool (it uses mix release on the images), and there is no way to generate a docker image for development environment by default.

I really like the features like hot-code reloading and don’t want to lose them. The way I found until now is creating a alternate Dockerfile for docker-compose, but this way, prod and dev are totally different!

Did anyone worked through this already?

1 Like