dimanche 22 mars 2020

Should config be built into a Docker image (best practice)

I am currently looking to deploy a Docker application that uses an Nginx proxy and a MySQL instance (amongst other things).

What is the best practice when it comes to configuration files (in the case of Nginx) or initial table set up and server configuration (in the case of SQL)?

Is it generally better to build this config into a custom image in the Docker file (so take the standard Nginx image as a parent and copy the config into the image and build it) or to build the standard Nginx file in the docker-compose file and use volumes and bind mounts to bring the config into the image at the time of deployment? (and the analogous questions for a SQL container).




Aucun commentaire:

Enregistrer un commentaire