Fix folder creation in Kubernetes
NyakudyaA opened this issue · 1 comments
NyakudyaA commented
What is the bug or the crash?
When running in Kubernetes in non-root mode the container cannot create the folders specified in https://github.com/kartoza/docker-postgis/blob/develop/scripts/setup-conf.sh
create_dir ${EXTRA_CONF_DIR}
create_dir ${CONF_LOCKFILE_DIR}
create_dir ${SCRIPTS_LOCKFILE_DIR}
In order to run it currently you need to mound these folders as volumes. We need to define a way to create these folders by default
A possible solutions to this include
- In
entrypoint.sh
move the logic to create a home directory in https://github.com/kartoza/docker-postgis/blob/develop/scripts/docker-entrypoint.sh#L39, This will also require some env values to be changed to have the location be specific to the home directory
Steps to reproduce the issue
Run the container in kubernetes using the env RUN_AS_ROOT=False
Versions
kartoza/postgis:15-3.3
Additional context
No response
NyakudyaA commented