Unable to use mounted configuration

As per documentation https://docs.janusgraph.org/operations/container/#mounted-configuration, I need to provide ro to volume parameter for mounting custom configurations. However, I get below error in container Attaching to wfx-janusgraph-1 wfx-janusgraph-1 | cp: cannot create regular file '/etc/opt/janusgraph/janusgraph.properties': Read-only file system wfx-janusgraph-1 | cp: cannot create regular file '/etc/opt/janusgraph/janusgraph-server.yaml': Read-only file system wfx-janusgraph-1 | chown: changing ownership of '/etc/opt/janusgraph': Read-only file system wfx-janusgraph-1 | chmod: changing permissions of '/etc/opt/janusgraph': Read-only file system wfx-janusgraph-1 | chmod: changing permissions of '/etc/opt/janusgraph/janusgraph.properties': Read-only file system wfx-janusgraph-1 | chmod: changing permissions of '/etc/opt/janusgraph/janusgraph-server.yaml': Read-only file system
1 Reply
heCodes
heCodesOP4mo ago
Can someone help me with this query please? Looks like we can't really mount the volumes as is on janusgraph container. I did a workaround against this by using COPY command within my DockerFile with correct chown specification. However, I still see the overrides which I provided are not honoured. I can clearly see below code snippet from docker-entrypoint.sh just overrides the custom properties from the default ones. if [ "$1" == 'janusgraph' ]; then # setup config directory mkdir -p ${JANUS_DATA_DIR} ${JANUS_CONFIG_DIR} cp conf/janusgraph-${JANUS_PROPS_TEMPLATE}-server.properties ${JANUS_PROPS} cp conf/janusgraph-server.yaml ${JANUSGRAPH_SERVER_YAML} chown -R "$(id -u):$(id -g)" ${JANUS_DATA_DIR} ${JANUS_CONFIG_DIR} chmod 700 ${JANUS_DATA_DIR} ${JANUS_CONFIG_DIR} chmod -R 600 ${JANUS_CONFIG_DIR}/* Why is this implemented this way? Overriding parameters sounds a basic requirement and I am pretty sure everyone who is using janusgraph would have faced this issue.

Did you find this page helpful?