Closed psychemedia closed 4 years ago
You still allocate one container per purpose with compose, you just expose resources to other containers. It's also arguable if one function per container is really "best practice" - for scientific reproducibility it's better to have multiple entrypoints for a single container, actually. I made the scientific filesystem to support that. http://sci-f.github.io/
https://github.com/nuest/ten-simple-rules-dockerfiles/blob/4a87e3e3ad43feacd98722f1521e500191bb17bb/ten-simple-rules-dockerfiles.Rmd#L375
Docker-compose also speaks to architectural design. When docker first appeared, best practice seemed to be to put one service per container, with docker-compose wiring containers together to share services amongst them. More recently, it seems like there are now robust patterns for developing containers that run multiple services.
When it comes to best practice, it may be worth reflecting on this.