democratic_csi/images/democratic-csi/entrypoint.sh

13 lines
432 B
Bash
Executable File

#!/bin/sh
set -e
# Ensure mount is owned by root. It could be another owner
# if userns are enabled at the Docker daemon level, but we run this
# container in the host userns. In this case, root owned files will appear
# as owned by, eg 100000. And as mount / umount are setuid, it'll drop privileges
# to this user account, preventing to mount
chown root:root /bin/mount /bin/umount /sbin/mount.nfs
exec ./bin/democratic-csi $@