File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,6 +97,10 @@ RUN set -eux; \
9797 echo 'if [ "${1#-}" != "$1" ] || [ "${1%.conf}" != "$1" ]; then' >> /usr/local/bin/docker-entrypoint.sh; \
9898 echo ' set -- keydb-server "$@"' >> /usr/local/bin/docker-entrypoint.sh; \
9999 echo 'fi' >> /usr/local/bin/docker-entrypoint.sh; \
100+ echo '# if KEYDB_PASSWORD is set, add it to the arguments' >> /usr/local/bin/docker-entrypoint.sh; \
101+ echo 'if [ -n "$KEYDB_PASSWORD" ]; then' >> /usr/local/bin/docker-entrypoint.sh; \
102+ echo ' set -- "$@" --requirepass "${KEYDB_PASSWORD}"' >> /usr/local/bin/docker-entrypoint.sh; \
103+ echo 'fi' >> /usr/local/bin/docker-entrypoint.sh; \
100104 echo "# allow the container to be started with `--user`" >> /usr/local/bin/docker-entrypoint.sh; \
101105 echo 'if [ "$1" = "keydb-server" -a "$(id -u)" = "0" ]; then' >> /usr/local/bin/docker-entrypoint.sh; \
102106 echo " find . \! -user keydb -exec chown keydb '{}' +" >> /usr/local/bin/docker-entrypoint.sh; \
Original file line number Diff line number Diff line change @@ -68,6 +68,10 @@ RUN set -eux; \
6868 echo 'if [ "${1#-}" != "$1" ] || [ "${1%.conf}" != "$1" ]; then' >> /usr/local/bin/docker-entrypoint.sh; \
6969 echo ' set -- keydb-server "$@"' >> /usr/local/bin/docker-entrypoint.sh; \
7070 echo 'fi' >> /usr/local/bin/docker-entrypoint.sh; \
71+ echo '# if KEYDB_PASSWORD is set, add it to the arguments' >> /usr/local/bin/docker-entrypoint.sh; \
72+ echo 'if [ -n "$KEYDB_PASSWORD" ]; then' >> /usr/local/bin/docker-entrypoint.sh; \
73+ echo ' set -- "$@" --requirepass "${KEYDB_PASSWORD}"' >> /usr/local/bin/docker-entrypoint.sh; \
74+ echo 'fi' >> /usr/local/bin/docker-entrypoint.sh; \
7175 echo "# allow the container to be started with `--user`" >> /usr/local/bin/docker-entrypoint.sh; \
7276 echo 'if [ "$1" = "keydb-server" -a "$(id -u)" = "0" ]; then' >> /usr/local/bin/docker-entrypoint.sh; \
7377 echo " find . \! -user keydb -exec chown keydb '{}' +" >> /usr/local/bin/docker-entrypoint.sh; \
You can’t perform that action at this time.
0 commit comments