c-lightning-REST icon indicating copy to clipboard operation
c-lightning-REST copied to clipboard

Document docker setup with config file mounting

Open ShahanaFarooqui opened this issue 2 years ago • 3 comments
trafficstars

Document docker setup with config file mounting

ShahanaFarooqui avatar May 06 '23 22:05 ShahanaFarooqui

I'm running into this issue to. The docker image overwrites the config on every start. I tried to bind the config as read only to prevent this but the image will no longer start due to the error below.

./docker-entrypoint.sh: line 4: can't create cl-rest-config.json: Read-only file system

FallingSnow avatar Jul 06 '23 16:07 FallingSnow

You unconditionally overwrite the file here: https://github.com/Ride-The-Lightning/c-lightning-REST/blob/29de0b08613d4f7866e2c604d09ce25c690bc118/docker-entrypoint.sh#L4-L12

FallingSnow avatar Jul 06 '23 16:07 FallingSnow

A workaround for the time being (if you're using docker-compose) it to override the docker entrypoint. Add the following to your docker-compose.yml:

entrypoint: node cl-rest.js

FallingSnow avatar Jul 06 '23 16:07 FallingSnow