You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by xx...@apache.org on 2021/05/25 02:28:01 UTC
[kylin] branch master updated: KYLIN-4944 kylin3 Docker image is
upgraded from centos6.9 to centos7.9.2009 (#1629)
This is an automated email from the ASF dual-hosted git repository.
xxyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/master by this push:
new eb7f802 KYLIN-4944 kylin3 Docker image is upgraded from centos6.9 to centos7.9.2009 (#1629)
eb7f802 is described below
commit eb7f802c26485e1d2bfba4d35c22cfc1ee510bea
Author: weijian wang <cn...@gmail.com>
AuthorDate: Tue May 25 10:27:53 2021 +0800
KYLIN-4944 kylin3 Docker image is upgraded from centos6.9 to centos7.9.2009 (#1629)
* KYLIN-4944 kylin3 Docker image is upgraded from centos6.9 to centos7.9.2009
* KYLIN-4944 kylin3 Docker image is upgraded from centos6.9 to centos7.9.2009
---
docker/Dockerfile_hadoop | 11 +++++++++--
docker/entrypoint.sh | 9 +++++++--
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/docker/Dockerfile_hadoop b/docker/Dockerfile_hadoop
index 8afd219..984cef6 100644
--- a/docker/Dockerfile_hadoop
+++ b/docker/Dockerfile_hadoop
@@ -16,7 +16,7 @@
#
# Docker image with Hadoop/Hive/HBase/Spark/ZK/Kafka/Livy installed
-FROM centos:6.9
+FROM centos:7.9.2009
ENV HIVE_VERSION 1.2.1
ENV HADOOP_VERSION 2.7.0
@@ -43,7 +43,14 @@ USER root
WORKDIR /home/admin
# install tools
-RUN yum -y install lsof.x86_64 wget.x86_64 tar.x86_64 git.x86_64 mysql-server.x86_64 mysql.x86_64 unzip.x86_64
+RUN yum -y install lsof.x86_64 wget.x86_64 tar.x86_64 git which.x86_64 net-tools.x86_64 unzip.x86_64
+
+#install mysql
+RUN wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm \
+ && rpm -Uvh mysql80-community-release-el7-3.noarch.rpm \
+ && yum-config-manager --disable mysql80-community \
+ && yum-config-manager --enable mysql57-community \
+ && yum install -y mysql-community-server.x86_64 mysql-community-client.x86_64
# install mvn
RUN wget https://archive.apache.org/dist/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.tar.gz \
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh
index 262ea4c..af7cc5d 100644
--- a/docker/entrypoint.sh
+++ b/docker/entrypoint.sh
@@ -22,10 +22,15 @@ echo "127.0.0.1 sandbox.hortonworks.com" >> /etc/hosts
rm -f /tmp/*.pid
# start mysql
-service mysqld start
if [ ! -f "/home/admin/first_run" ]
then
- mysqladmin -uroot password 123456
+ mysqld_pre_systemd
+fi
+mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid -u root
+if [ ! -f "/home/admin/first_run" ]
+then
+ mysql_init_password=`cat /var/log/mysqld.log |grep -Po '(?<=A temporary password is generated for root@localhost: )\S+'`
+ mysql --connect-expired-password -u root -p$mysql_init_password -e "set global validate_password_policy=0;set global validate_password_length=6;alter user user() identified by '123456';"
mysql -uroot -p123456 -e "grant all privileges on root.* to root@'%' identified by '123456';"
fi