diff options
Diffstat (limited to 'src/main/docker')
-rw-r--r-- | src/main/docker/Dockerfile | 15 | ||||
-rw-r--r-- | src/main/docker/scripts/start-zookeeper | 5 |
2 files changed, 2 insertions, 18 deletions
diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile index 2d271e4..eea222a 100644 --- a/src/main/docker/Dockerfile +++ b/src/main/docker/Dockerfile @@ -37,17 +37,4 @@ RUN set -x \ #Copy configuration generator script to bin -COPY scripts /opt/zookeeper/bin/ - -# Create a user for the zookeeper process and configure file system ownership -# for nessecary directories and symlink the distribution as a user executable -RUN set -x \ - && useradd $ZK_USER \ - && [ `id -u $ZK_USER` -eq 1000 ] \ - && [ `id -g $ZK_USER` -eq 1000 ] \ - && mkdir -p $ZK_DATA_DIR $ZK_DATA_LOG_DIR $ZK_LOG_DIR /usr/share/zookeeper /tmp/zookeeper /usr/etc/ \ - && chown -R "$ZK_USER:$ZK_USER" /opt/$ZK_DIST $ZK_DATA_DIR $ZK_LOG_DIR $ZK_DATA_LOG_DIR /tmp/zookeeper \ - && ln -s /opt/zookeeper/conf/ /usr/etc/zookeeper \ - && ln -s /opt/zookeeper/bin/* /usr/bin \ - && ln -s /opt/zookeeper/$ZK_DIST.jar /usr/share/zookeeper/ \ - && ln -s /opt/zookeeper/lib/* /usr/share/zookeeper +COPY scripts /opt/zookeeper/bin/
\ No newline at end of file diff --git a/src/main/docker/scripts/start-zookeeper b/src/main/docker/scripts/start-zookeeper index 25fe466..d3429be 100644 --- a/src/main/docker/scripts/start-zookeeper +++ b/src/main/docker/scripts/start-zookeeper @@ -1,4 +1,3 @@ -USER=`whoami` HOST=`hostname -s` DOMAIN=`hostname -d` LOG_LEVEL=INFO @@ -87,18 +86,16 @@ Starts a ZooKeeper server based on the supplied options. function create_data_dirs() { if [ ! -d $DATA_DIR ]; then mkdir -p $DATA_DIR - chown -R $USER:$USER $DATA_DIR fi if [ ! -d $DATA_LOG_DIR ]; then mkdir -p $DATA_LOG_DIR - chown -R $USER:USER $DATA_LOG_DIR fi if [ ! -d $LOG_DIR ]; then mkdir -p $LOG_DIR - chown -R $USER:$USER $LOG_DIR fi + if [ ! -f $ID_FILE ] && [ $SERVERS -gt 1 ]; then echo $MY_ID >> $ID_FILE fi |