8 months ago
Hey Team, I have a Docker compose file that also mounts the config files. Because of this, I can't deploy it without removing those volume mounts, so I want to know if there's any way other than rebuilding Docker images with the config files and then using Docker compose.
2 Replies
8 months ago
Bind-mounts point to files on your machine, a remote host can’t see them, so the deploy fails.
You’ve only got three practical fixes:
COPY the config files into the image during build.
Pass the config as env-vars/secrets provided by the platform.
Use a “prod” compose file without the mounts (docker-compose.yml + docker-compose.prod.yml).
There’s no flag that makes the cloud read ./config.yml from your computer, pick one of the above and this should hopefully solve your issue! 