How to provide config file in docker compose file?
muneeebsheikh opened this issue · 2 comments
muneeebsheikh commented
Hi I want to provide config file to the docker container via docker compose file.
I am sure there is some way to do that, it would be great someone can help me out with this.
Thanks.
Deleted user commented
Maybe just add this line at the end of the docker-compose.yaml?
" entrypoint: ["/bin/ftpserver","-conf","/apps/ftpserver.json"]" (with the spaces, because it is a yaml)
ScottESanDiego commented
Just mount the config file into the container as a volume. Here's my trivial docker-compse
file, note the ftpserver.json
volume:
services:
ftp:
image: fclairamb/ftpserver:latest
container_name: ftp
volumes:
- /data/media/ftp/ftpserver.json:/app/ftpserver.json:ro
- /var/ftproot:/ftproot
- /etc/acme-sh/scotte.ai_ecc/scotte.ai.key:/key.pem:ro
- /etc/acme-sh/scotte.ai_ecc/scotte.ai.cer:/cert.pem:ro
ports:
- "2121-2130:2121-2130/tcp"