diff --git a/docker/Dockerfile b/docker/Dockerfile index 45d422e5fc9..5a22bb68874 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -31,7 +31,7 @@ ENV BK_USER=bookkeeper # Download Apache Bookkeeper, untar and clean up RUN set -x \ && adduser "${BK_USER}" \ - && yum install -y java-1.8.0-openjdk-headless wget bash python md5sum sha1sum \ + && yum install -y java-1.8.0-openjdk-headless wget bash python md5sum sha1sum sudo \ && mkdir -pv /opt \ && cd /opt \ && wget -q "https://archive.apache.org/dist/bookkeeper/bookkeeper-${BK_VERSION}/${DISTRO_NAME}.tar.gz" \ @@ -45,7 +45,7 @@ RUN set -x \ && tar -xzf "$DISTRO_NAME.tar.gz" \ && mv bookkeeper-server-${BK_VERSION}/ /opt/bookkeeper/ \ && rm -rf "$DISTRO_NAME.tar.gz" "$DISTRO_NAME.tar.gz.asc" "$DISTRO_NAME.tar.gz.md5" "$DISTRO_NAME.tar.gz.sha1" \ - && yum remove -y wget \ + && yum remove -y wget md5sum sha1sum \ && yum clean all WORKDIR /opt/bookkeeper diff --git a/docker/Makefile b/docker/Makefile index 27c8ce63645..64078db4f96 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -38,6 +38,7 @@ BK_zkLedgersRootPath = /ledgers ZK_CONTAINER_NAME=test_zookeeper ZK_LOCAL_DATA_DIR=$(BK_LOCAL_DATA_DIR)/zookkeeper +TERMINAL_EMULATOR=gnome-terminal CONTAINER_IP=$(shell docker inspect --format '{{ .NetworkSettings.IPAddress }}' $(CONTAINER_NAME)) @@ -78,6 +79,7 @@ run-bk: --volume $(BK_LOCAL_CONTAINER_DATA_DIR)/journal:$(BK_DIR)/journal \ --volume $(BK_LOCAL_CONTAINER_DATA_DIR)/ledger:$(BK_DIR)/ledger \ --volume $(BK_LOCAL_CONTAINER_DATA_DIR)/index:$(BK_DIR)/index \ + --user "$(id -u)" \ --name "$(CONTAINER_NAME)" \ --hostname "$(CONTAINER_NAME)" \ --env BK_zkServers=$(ZK_CONTAINER_NAME):2181 \ diff --git a/docker/scripts/entrypoint.sh b/docker/scripts/entrypoint.sh index 310970ae729..dffbc9360ac 100755 --- a/docker/scripts/entrypoint.sh +++ b/docker/scripts/entrypoint.sh @@ -46,7 +46,7 @@ echo "BK_CLUSTER_ROOT_PATH is $BK_CLUSTER_ROOT_PATH" mkdir -p "${BK_journalDirectory}" "${BK_ledgerDirectories}" "${BK_indexDirectories}" # -------------- # # Allow the container to be started with `--user` -if [ "$1" = 'bookkeeper' -a "$(id -u)" = '0' ]; then +if [ "$1" = '/opt/bookkeeper/bin/bookkeeper' -a "$(id -u)" = '0' ]; then chown -R "$BK_USER:$BK_USER" "/opt/bookkeeper/" "${BK_journalDirectory}" "${BK_ledgerDirectories}" "${BK_indexDirectories}" sudo -s -E -u "$BK_USER" /bin/bash "$0" "$@" exit diff --git a/site/_config.apache.yml b/site/_config.apache.yml index 7708fd0536b..b146843dd3e 100644 --- a/site/_config.apache.yml +++ b/site/_config.apache.yml @@ -1,2 +1,2 @@ -baseurl: /test/content/ +baseurl: / destination: generated_site/content