ftpserver icon indicating copy to clipboard operation
ftpserver copied to clipboard

How to provide config file in docker compose file?

Open muneeebsheikh opened this issue 2 years ago • 2 comments

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.

muneeebsheikh avatar Mar 04 '24 11:03 muneeebsheikh

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)

ghost avatar Apr 20 '24 18:04 ghost

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"

ScottESanDiego avatar Sep 12 '24 00:09 ScottESanDiego