From 76c55ef829375736bec6a5b4ebcb9e41c3c911ae Mon Sep 17 00:00:00 2001 From: Debdutto Chakraborty Date: Tue, 29 May 2018 13:28:31 +0530 Subject: [PATCH 1/2] Fixes mysqld issue and updates Zookeeper --- Dockerfile | 5 +++-- supervisord.conf | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9aee43f..ff017da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM ubuntu:14.04 # Set version and github repo which you want to build from ENV GITHUB_OWNER druid-io ENV DRUID_VERSION 0.9.2 -ENV ZOOKEEPER_VERSION 3.4.11 +ENV ZOOKEEPER_VERSION 3.4.12 # Java 8 RUN apt-get update \ @@ -62,7 +62,8 @@ WORKDIR / # Setup metadata store and add sample data ADD sample-data.sql sample-data.sql -RUN /etc/init.d/mysql start \ +RUN chown -R mysql:mysql /var/lib/mysql /var/run/mysqld \ + && /etc/init.d/mysql start \ && mysql -u root -e "GRANT ALL ON druid.* TO 'druid'@'localhost' IDENTIFIED BY 'diurd'; CREATE database druid CHARACTER SET utf8;" \ && java -cp /usr/local/druid/lib/druid-services-*-selfcontained.jar \ -Ddruid.extensions.directory=/usr/local/druid/extensions \ diff --git a/supervisord.conf b/supervisord.conf index aeeff7b..170d17e 100644 --- a/supervisord.conf +++ b/supervisord.conf @@ -8,8 +8,8 @@ user=daemon priority=0 [program:mysql] -command=/usr/bin/pidproxy /var/run/mysqld/mysqld.pid /usr/bin/mysqld_safe -user=mysql +command=/bin/bash -c "chown -R mysql:mysql /var/lib/mysql /var/run/mysqld && /etc/init.d/mysql start" +user=root priority=0 [program:druid-coordinator] From c923d243fdc73fbc029e7496c69f8e2c9d79d14d Mon Sep 17 00:00:00 2001 From: Debdutto Chakraborty Date: Tue, 29 May 2018 14:21:48 +0530 Subject: [PATCH 2/2] Better fix for mysqld --- Dockerfile | 4 ++-- supervisord.conf | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index ff017da..e2fe0d9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -62,7 +62,7 @@ WORKDIR / # Setup metadata store and add sample data ADD sample-data.sql sample-data.sql -RUN chown -R mysql:mysql /var/lib/mysql /var/run/mysqld \ +RUN find /var/lib/mysql -type f -exec touch {} \; \ && /etc/init.d/mysql start \ && mysql -u root -e "GRANT ALL ON druid.* TO 'druid'@'localhost' IDENTIFIED BY 'diurd'; CREATE database druid CHARACTER SET utf8;" \ && java -cp /usr/local/druid/lib/druid-services-*-selfcontained.jar \ @@ -93,4 +93,4 @@ EXPOSE 3306 EXPOSE 2181 2888 3888 WORKDIR /var/lib/druid -ENTRYPOINT export HOSTIP="$(resolveip -s $HOSTNAME)" && exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf +ENTRYPOINT export HOSTIP="$(resolveip -s $HOSTNAME)" && find /var/lib/mysql -type f -exec touch {} \; && exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf diff --git a/supervisord.conf b/supervisord.conf index 170d17e..aeeff7b 100644 --- a/supervisord.conf +++ b/supervisord.conf @@ -8,8 +8,8 @@ user=daemon priority=0 [program:mysql] -command=/bin/bash -c "chown -R mysql:mysql /var/lib/mysql /var/run/mysqld && /etc/init.d/mysql start" -user=root +command=/usr/bin/pidproxy /var/run/mysqld/mysqld.pid /usr/bin/mysqld_safe +user=mysql priority=0 [program:druid-coordinator]