Where do you store your docker and compose files?

Hi

we are using docker for running many different applications (mostly webapps developed in Java).

To build the containers we need different Dockerfiles and some scripts, for running the containers in different environments (dev, test, prod) we use docker-compose.

I guess this is a pretty common scenario. My question is: Where to put those files required for building the Docker images and die docker-compose config?

Do you put them into the same repository as the application? Or do you create separate repositories?

Sometimes the docker-compose files contain information that should not be visible to every developer.
Sometimes I do not want to checkout the whole source code of the application on the server just to access the docker compose files.

1 Like

In your situation I feel it would be good to create a separate project for the configuration and orchestration components such as the docker-compose files.

Thanks, that is the result of my experiments in the last days too.

I will place the files required to generate the Docker images inside the git repositories of the application and the compose stuff in separate repositories.

Currently I am trying to find out how I will organise those repositories for compose files. By host on which are multiple applications orchestrated via compose or per application.