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_r128213959
########## 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: Matteo's py only handles not commented out properties present in original files. It needs to be enhanced with handling of commented ones IMHO, in order to not create confusion (if the doc says "you can set BK_xxxx for setting corresponding BK property" I expect this behavior, if it don't work it's not kind to demand the user dig in the code to figure out the reason). If we provide default conf files with all properties not commented out, then the problem arise if user mount it's own conf files. ---------------------------------------------------------------- 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