caiok commented on a change in pull request #197: BOOKKEEPER-974: Add an official bookkeeper docker image URL: https://github.com/apache/bookkeeper/pull/197#discussion_r127411473
########## File path: docker/4.4.0-alpine/run.sh ########## @@ -0,0 +1,68 @@ +#/bin/bash + +# -------------- # +set -x -e -u +# -------------- # + +# -------------- # +# Allow the container to be started with `--user` +if [ "$1" = 'bookkeeper' -a "$(id -u)" = '0' ]; then + chown -R "$BK_USER" "${BK_DIR}" "${BK_JOURNAL_DIR}" "${BK_LEDGER_DIR}" "${BK_INDEX_DIR}" + exec su-exec "$BK_USER" /bin/bash "$0" "$@" + exit +fi +# -------------- # + +# -------------- # +# Copy input config files in Bookkeeper configuration directory +cp -vaf /conf/* ${BK_DIR}/conf || true +chown -R "$BK_USER" ${BK_DIR}/conf + +# Bookkeeper setup Review comment: Is the first step really needed or we could use the default bk_server.conf and then in run phase use found BK_xxx env variables for substitute confs in it? Furthermore, the first step will brake the possibility to mount an already set configuration file (it would be entirely rewritten). ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services