container fails to run without volume mount for `/bitnami` dir
Summary
When just running this docker container, without any volume mounts, it crashes on startup with message of mkdir: cannot create directory '/bitnami': Permission denied
. I found this because I use this image in a gitlab ci pipeline as a service (to run integration tests against) and in that situation it does not have a volume mount for persistent data
Steps to reproduce
Run the container without any volume mounts
What is the current bug behavior?
Fails to run unless there is a volume mount
What is the expected correct behavior?
Should be able to run
Relevant logs and/or screenshots
redis 14:03:31.53
redis 14:03:31.53 Welcome to the Bitnami redis container
redis 14:03:31.54 Subscribe to project updates by watching https://github.com/bitnami/containers
redis 14:03:31.54 Submit issues and feature requests at https://github.com/bitnami/containers/issues
redis 14:03:31.54
redis 14:03:31.54 INFO ==> ** Starting Redis setup **
redis 14:03:31.55 INFO ==> Initializing Redis
mkdir: cannot create directory '/bitnami': Permission denied
Possible fixes
I'm guessing this is related to the gid change in !382 (merged). Bitnami scripts try to create the volume mount dir if it does not exist https://github.com/bitnami/containers/blob/main/bitnami/redis/7.2/debian-11/rootfs/opt/bitnami/scripts/redis-env.sh#L18 https://github.com/bitnami/containers/blob/main/bitnami/redis/7.2/debian-11/rootfs/opt/bitnami/scripts/redis/postunpack.sh#L20. I'm guessing creating /bitnami
(and chown/chmod'ing it appropriately) in the dockerfile would fix
Tasks
-
Bug has been identified and corrected within the container
Please read the Iron Bank Documentation for more info