I need to edit the config.yml for the cloudflared docker container, however I am unaware of the location of said file as no shell is installed in the default container. I know how to edit it with just the location, but I don’t even have that. Is anyone aware of the path?
I’m not aware of any default directory used to store the config.yml
, however what I did was to perform bind mount from host folder to container folder, then I specify the config file path within the command line parameters such as tunnel --config /etc/cloudflared/config.yml run
.
I have a docker compose configuration that looks like this:
version: '3.7'
services:
cloudflared:
container_name: '${CLOUDFLARED_NAME}'
hostname: 'docker-${CLOUDFLARED_NAME}'
image: 'cloudflare/cloudflared:${CLOUDFLARED_VERSION}'
volumes:
- '${PWD}/cloudflared/:/etc/cloudflared/'
- '${PWD}/certs/ca/:/etc/cloudflared/certs/ca/:ro'
command: 'tunnel --config /etc/cloudflared/config.yml run'
restart: 'always'