Add file to restricted directory in container

I am following a tutorial ( on parsing pfSense logs and sending them to grafana. Part of the tutorial is copying a file to /etc/graylog/server, which requires elevated privs. I am running graylog in a container. Running docker exec /bin/bash gets me into the container, however I am unable to copy the file from the connected (host) persistent storage to where it needs to go as I don’t have root privs, and there doesn’t appear to be sudo on the container. How do I gain the privs necessary to move the file?

Thank you

he @brohan

you do not need to copy that to /etc/graylog/server - you could use any location. Just need to make sure that you adjust the configuration of the lookup table …

In addition you would use volumen mounts for this - like we have done in the docs for the plugins:

1 Like

I have tried to do the volume mount, however it does not seem to be taking. My compose file is:

I have a similar mount command for my elasticsearch container, which is working. If I docker exec -it /bin/bash and check the container, there are contents in the docker config directory, but they are not reflected on the host.

Thoughts where I am going wrong?

no idea what your problem is. Check your docker logs what kind of error message you get.