|
@@ -1,13 +1,11 @@
|
|
|
FROM ubuntu:18.04
|
|
|
|
|
|
-MAINTAINER journey "825193156@qq.com"
|
|
|
-
|
|
|
ENV LANG=C.UTF-8
|
|
|
|
|
|
ARG version
|
|
|
ARG tar_version
|
|
|
|
|
|
-#1,安装jdk
|
|
|
+#1,install jdk
|
|
|
|
|
|
RUN apt-get update \
|
|
|
&& apt-get -y install openjdk-8-jdk \
|
|
@@ -17,17 +15,10 @@ ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
|
|
|
ENV PATH $JAVA_HOME/bin:$PATH
|
|
|
|
|
|
|
|
|
-#安装wget
|
|
|
+#install wget
|
|
|
RUN apt-get update && \
|
|
|
apt-get -y install wget
|
|
|
-#2,安装ZK
|
|
|
-#RUN cd /opt && \
|
|
|
-# wget https://archive.apache.org/dist/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz && \
|
|
|
-# tar -zxvf zookeeper-3.4.6.tar.gz && \
|
|
|
-# mv zookeeper-3.4.6 zookeeper && \
|
|
|
-# rm -rf ./zookeeper-*tar.gz && \
|
|
|
-# mkdir -p /tmp/zookeeper && \
|
|
|
-# rm -rf /opt/zookeeper/conf/zoo_sample.cfg
|
|
|
+#2,install ZK
|
|
|
|
|
|
RUN cd /opt && \
|
|
|
wget https://www-us.apache.org/dist/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz && \
|
|
@@ -41,7 +32,7 @@ ADD ./dockerfile/conf/zookeeper/zoo.cfg /opt/zookeeper/conf
|
|
|
ENV ZK_HOME=/opt/zookeeper
|
|
|
ENV PATH $PATH:$ZK_HOME/bin
|
|
|
|
|
|
-#3,安装maven
|
|
|
+#3,install maven
|
|
|
RUN cd /opt && \
|
|
|
wget http://apache-mirror.rbc.ru/pub/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz && \
|
|
|
tar -zxvf apache-maven-3.3.9-bin.tar.gz && \
|
|
@@ -52,7 +43,7 @@ ADD ./dockerfile/conf/maven/settings.xml /opt/maven/conf
|
|
|
ENV MAVEN_HOME=/opt/maven
|
|
|
ENV PATH $PATH:$MAVEN_HOME/bin
|
|
|
|
|
|
-#4,安装node
|
|
|
+#4,install node
|
|
|
RUN cd /opt && \
|
|
|
wget https://nodejs.org/download/release/v8.9.4/node-v8.9.4-linux-x64.tar.gz && \
|
|
|
tar -zxvf node-v8.9.4-linux-x64.tar.gz && \
|
|
@@ -61,20 +52,22 @@ RUN cd /opt && \
|
|
|
ENV NODE_HOME=/opt/node
|
|
|
ENV PATH $PATH:$NODE_HOME/bin
|
|
|
|
|
|
-ADD . /opt/easyscheduler_source
|
|
|
+#5,add dolphinscheduler source code to /opt/dolphinscheduler_source
|
|
|
+ADD . /opt/dolphinscheduler_source
|
|
|
+
|
|
|
|
|
|
-#6,后端编译
|
|
|
-RUN cd /opt/easyscheduler_source && \
|
|
|
+#5,backend compilation
|
|
|
+RUN cd /opt/dolphinscheduler_source && \
|
|
|
mvn -U clean package assembly:assembly -Dmaven.test.skip=true
|
|
|
|
|
|
-#7,前端编译
|
|
|
-RUN chmod -R 777 /opt/easyscheduler_source/dolphinscheduler-ui && \
|
|
|
- cd /opt/easyscheduler_source/dolphinscheduler-ui && \
|
|
|
- rm -rf /opt/easyscheduler_source/dolphinscheduler-ui/node_modules && \
|
|
|
+#6,frontend compilation
|
|
|
+RUN chmod -R 777 /opt/dolphinscheduler_source/dolphinscheduler-ui && \
|
|
|
+ cd /opt/dolphinscheduler_source/dolphinscheduler-ui && \
|
|
|
+ rm -rf /opt/dolphinscheduler_source/dolphinscheduler-ui/node_modules && \
|
|
|
npm install node-sass --unsafe-perm && \
|
|
|
npm install && \
|
|
|
npm run build
|
|
|
-#8,安装mysql
|
|
|
+#7,install mysql
|
|
|
RUN echo "deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse" >> /etc/apt/sources.list
|
|
|
|
|
|
RUN echo "mysql-server mysql-server/root_password password root" | debconf-set-selections
|
|
@@ -97,26 +90,26 @@ RUN sed -i -e "$ a [client]\n\n[mysql]\n\n[mysqld]" /etc/mysql/my.cnf && \
|
|
|
sed -i -e "s/\(\[mysqld\]\)/\1\ninit_connect='SET NAMES utf8'\ncharacter-set-server = utf8\ncollation-server=utf8_general_ci\nbind-address = 0.0.0.0/g" /etc/mysql/my.cnf
|
|
|
|
|
|
|
|
|
-#9,安装nginx
|
|
|
+#8,install nginx
|
|
|
RUN apt-get update && \
|
|
|
apt-get install -y nginx && \
|
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
|
echo "\ndaemon off;" >> /etc/nginx/nginx.conf && \
|
|
|
chown -R www-data:www-data /var/lib/nginx
|
|
|
|
|
|
-#10,修改dolphinscheduler配置文件
|
|
|
-#后端配置
|
|
|
+#9,modify dolphinscheduler configuration file
|
|
|
+#backend configuration
|
|
|
RUN mkdir -p /opt/dolphinscheduler && \
|
|
|
- tar -zxvf /opt/easyscheduler_source/target/dolphinscheduler-${tar_version}.tar.gz -C /opt/dolphinscheduler && \
|
|
|
+ tar -zxvf /opt/dolphinscheduler_source/target/dolphinscheduler-${tar_version}.tar.gz -C /opt/dolphinscheduler && \
|
|
|
rm -rf /opt/dolphinscheduler/conf
|
|
|
ADD ./dockerfile/conf/dolphinscheduler/conf /opt/dolphinscheduler/conf
|
|
|
-#前端nginx配置
|
|
|
-ADD ./dockerfile/conf/nginx/default.conf /etc/nginx/conf.d
|
|
|
+#frontend nginx configuration
|
|
|
+ADD ./dockerfile/conf/nginx/dolphinscheduler.conf /etc/nginx/conf.d
|
|
|
|
|
|
-#11,开放端口
|
|
|
+#10,open port
|
|
|
EXPOSE 2181 2888 3888 3306 80 12345 8888
|
|
|
|
|
|
-#12,安装sudo,python,vim,ping和ssh
|
|
|
+#11,install sudo,python,vim,ping and ssh command
|
|
|
RUN apt-get update && \
|
|
|
apt-get -y install sudo && \
|
|
|
apt-get -y install python && \
|
|
@@ -128,7 +121,7 @@ RUN apt-get update && \
|
|
|
pip install kazoo
|
|
|
|
|
|
COPY ./dockerfile/startup.sh /root/startup.sh
|
|
|
-#13,修改权限和设置软连
|
|
|
+#12,modify permissions and set soft links
|
|
|
RUN chmod +x /root/startup.sh && \
|
|
|
chmod +x /opt/dolphinscheduler/script/create-dolphinscheduler.sh && \
|
|
|
chmod +x /opt/zookeeper/bin/zkServer.sh && \
|