Correct way with docker run to path to config file and runtime path

We’re not having any luck comping our go module for the nakama 2.7.0 linux binary, we thought we’d try docker on our production environment. How do we set the --config and --runtime.path properties for docker run heroiclabs/nakama ?
Trying $HOME/nakama/nakama-config.yml gets us no such file or directory - I guess it’s scoped to the container and not the local file system. Do we have to mount volumes?

You’ll definitely need to mount volumes on the docker VM to access files from your local machine. This is pretty standard usage for Docker. Have a look more on this:

@mofirouz I have create a volume and it’s working when I run nakama, as the modules folder is automatically created. However I’m having trouble getting the container to find my nakama-config.yml file, as I don’t know what the expected directory is for the container to find the config. I’ve tried putting it in nakama/data next to the modules directory but that doesn’t work. How do I map an external config yml to the container?

You can try to put your custom config file in the same folder as the modules and referenced it on your command or args section of your docker.

Yeah, I’ve tried that and the response is no such file or directory exists:
docker run -v docroot:/nakama/data heroiclabs/nakama --config nakama-config.yml
where nakama-config.yml is in docroot

btw this is driven by the documentation, which may need updating:
docker run --link=db -p 7350:7350 -p 7351:7351 heroiclabs/nakama --database.address root@db:26257 --config /path/to/config.yml --socket.server_key “mynewkey”
from the docker quick start page

According to your example above, docroot is mounted to onto the /nakama/data directory - You should try and use the full path /nakama/data/nakama-config.yml to load the config file.

Failing this, you can use command line flags when starting Nakama to pass custom config.

how to load --config file through docker-compose.yml file

You can add the config argument to the entrypoint exec line after exec /nakama/nakama --config /nakama/data/nakama-config.yml