-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add ubuntu docker for docker file (#419)
- Loading branch information
Showing
9 changed files
with
271 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# base image | ||
FROM ubuntu:20.04 | ||
|
||
VOLUME /tmp | ||
|
||
ENV GEAFLOW_INSTALL_PATH=/opt | ||
ENV GEAFLOW_HOME=$GEAFLOW_INSTALL_PATH/geaflow | ||
|
||
ENV TZ=Asia/Shanghai | ||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||
|
||
RUN apt-get update | ||
|
||
# base packages | ||
RUN apt-get -y install wget vim curl | ||
RUN apt-get -y install gcc g++ | ||
|
||
# jdk | ||
RUN apt-get -y install openjdk-8-jdk \ | ||
&& echo "export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk" >> /etc/profile \ | ||
&& echo "export JRE_HOME=\${JAVA_HOME}/jre" >> /etc/profile \ | ||
&& echo "export CLASSPATH=.:\${JAVA_HOME}/lib:\${JRE_HOME}/lib:\$CLASSPATH" >> /etc/profile \ | ||
&& echo "export JAVA_PATH=\${JAVA_HOME}/bin:\${JRE_HOME}/bin" >> /etc/profile \ | ||
&& echo "export PATH=\$PATH:\${JAVA_PATH}" >> /etc/profile \ | ||
&& . /etc/profile | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
RUN apt-get install -y mysql-server | ||
|
||
# redis | ||
RUN apt-get install -y redis | ||
|
||
RUN apt-get install -y gnupg | ||
# influxdb | ||
RUN wget -qO- https://repos.influxdata.com/influxdb.key | apt-key add - | ||
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D8FF8E1F7DF8B07E | ||
RUN echo "deb https://repos.influxdata.com/ubuntu focal stable" | tee /etc/apt/sources.list.d/influxdb.list | ||
RUN apt-get update | ||
RUN apt-get install -y influxdb2 | ||
RUN cp /usr/bin/influx /usr/local/bin/ | ||
|
||
# copy console jar | ||
WORKDIR $GEAFLOW_HOME/ | ||
COPY geaflow-console/target/boot/geaflow-console-bootstrap-*-executable.jar \ | ||
$GEAFLOW_HOME/boot/geaflow-console-bootstrap.jar | ||
COPY geaflow-console/target/config $GEAFLOW_HOME/config | ||
COPY geaflow-console/docker $GEAFLOW_HOME/ | ||
|
||
# copy geaflow jar | ||
ENV GEAFLOW_LOCAL_VERSION_PATH=/tmp/geaflow/local/versions/defaultVersion/defaultVersion.jar | ||
COPY geaflow/geaflow-deploy/geaflow-assembly/target/geaflow-assembly-*.jar \ | ||
$GEAFLOW_LOCAL_VERSION_PATH | ||
RUN md5sum $GEAFLOW_LOCAL_VERSION_PATH |awk '{print $1}' > $GEAFLOW_LOCAL_VERSION_PATH.md5 | ||
|
||
EXPOSE 8888 3306 6379 8086 2181 | ||
|
||
ENTRYPOINT ["bash", "/opt/geaflow/bin/start-process.sh"] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# base image | ||
FROM ubuntu:20.04 | ||
|
||
VOLUME /tmp | ||
|
||
ENV GEAFLOW_INSTALL_PATH=/opt | ||
ENV GEAFLOW_HOME=$GEAFLOW_INSTALL_PATH/geaflow | ||
|
||
ENV TZ=Asia/Shanghai | ||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||
|
||
RUN apt-get update | ||
|
||
# base packages | ||
RUN apt-get -y install wget procps vim curl | ||
RUN apt-get -y install gcc g++ | ||
|
||
RUN apt-get -y install maven | ||
|
||
# jdk | ||
RUN apt-get -y install openjdk-8-jdk \ | ||
&& echo "export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk" >> /etc/profile \ | ||
&& echo "export JRE_HOME=\${JAVA_HOME}/jre" >> /etc/profile \ | ||
&& echo "export CLASSPATH=.:\${JAVA_HOME}/lib:\${JRE_HOME}/lib:\$CLASSPATH" >> /etc/profile \ | ||
&& echo "export JAVA_PATH=\${JAVA_HOME}/bin:\${JRE_HOME}/bin" >> /etc/profile \ | ||
&& echo "export PATH=\$PATH:\${JAVA_PATH}" >> /etc/profile \ | ||
&& . /etc/profile | ||
|
||
# mysql | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
RUN apt-get install -y mysql-server | ||
|
||
# redis | ||
RUN apt-get install -y redis | ||
|
||
RUN apt-get install -y gnupg | ||
|
||
# influxdb | ||
RUN wget -qO- https://repos.influxdata.com/influxdb.key | apt-key add - | ||
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D8FF8E1F7DF8B07E | ||
RUN echo "deb https://repos.influxdata.com/ubuntu focal stable" | tee /etc/apt/sources.list.d/influxdb.list | ||
RUN apt-get update | ||
RUN apt-get install -y influxdb2 | ||
RUN cp /usr/bin/influx /usr/local/bin/ | ||
|
||
# copy console jar | ||
WORKDIR $GEAFLOW_HOME/ | ||
COPY geaflow-console/target/boot/geaflow-console-bootstrap-*-executable.jar \ | ||
$GEAFLOW_HOME/boot/geaflow-console-bootstrap.jar | ||
COPY geaflow-console/target/config $GEAFLOW_HOME/config | ||
COPY geaflow-console/docker $GEAFLOW_HOME/ | ||
|
||
# copy geaflow jar | ||
ENV GEAFLOW_LOCAL_VERSION_PATH=/tmp/geaflow/local/versions/defaultVersion/defaultVersion.jar | ||
COPY geaflow/geaflow-deploy/geaflow-assembly/target/geaflow-assembly-*.jar \ | ||
$GEAFLOW_LOCAL_VERSION_PATH | ||
RUN md5sum $GEAFLOW_LOCAL_VERSION_PATH |awk '{print $1}' > $GEAFLOW_LOCAL_VERSION_PATH.md5 | ||
|
||
EXPOSE 8888 3306 6379 8086 2181 | ||
|
||
ENTRYPOINT ["bash", "/opt/geaflow/bin/start-process.sh"] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# base image | ||
FROM ubuntu:20.04 | ||
|
||
# base package | ||
RUN apt-get update && apt-get install -y wget procps vim curl gcc g++ | ||
|
||
RUN apt-get install -y python2 | ||
|
||
RUN curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py | ||
|
||
RUN python2 get-pip.py | ||
|
||
RUN pip install supervisor==3.4.0 | ||
|
||
# java | ||
RUN apt-get install -y openjdk-8-jdk \ | ||
&& echo "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-arm64" >> /etc/profile \ | ||
&& echo "export JRE_HOME=\${JAVA_HOME}/jre" >> /etc/profile \ | ||
&& . /etc/profile | ||
|
||
# environment variables | ||
ENV GEAFLOW_INSTALL_PATH=/opt | ||
ENV GEAFLOW_HOME=$GEAFLOW_INSTALL_PATH/geaflow | ||
ENV GEAFLOW_LIB_DIR=$GEAFLOW_HOME/lib \ | ||
GEAFLOW_CONF_DIR=$GEAFLOW_HOME/conf/ LANG="en_US.UTF-8" \ | ||
PATH=$PATH:$GEAFLOW_HOME/bin JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk | ||
ENV PATH=$JAVA_HOME/bin:${PATH} | ||
|
||
ARG ASYNC_PROFILER_DIR_NAME=async-profiler-2.8.1-linux-x64 | ||
ARG ASYNC_PROFILER_TAR_NAME=${ASYNC_PROFILER_DIR_NAME}.tar.gz | ||
RUN wget https://github.com/jvm-profiling-tools/async-profiler/releases/download/v2.8.1/${ASYNC_PROFILER_TAR_NAME} \ | ||
&& tar zxvf ${ASYNC_PROFILER_TAR_NAME} -C ${GEAFLOW_INSTALL_PATH} \ | ||
&& rm ${ASYNC_PROFILER_TAR_NAME} \ | ||
&& mv ${GEAFLOW_INSTALL_PATH}/${ASYNC_PROFILER_DIR_NAME} ${GEAFLOW_INSTALL_PATH}/async-profiler | ||
ENV ASYNC_PROFILER_SHELL_PATH=${GEAFLOW_INSTALL_PATH}/async-profiler/profiler.sh | ||
|
||
ARG TMP_ENGINE_TAR_PATH=${GEAFLOW_INSTALL_PATH}/engine_tar | ||
RUN mkdir -p ${TMP_ENGINE_TAR_PATH} | ||
# geaflow-engine-tar is the *.tar.gz file built by maven | ||
ARG geaflow_engine_tar=NOT_SET | ||
# Copy engine tar to tmp dir | ||
ADD $geaflow_engine_tar $TMP_ENGINE_TAR_PATH | ||
# Copy the extracted engine dir into geaflow dir. | ||
RUN dirname=`ls ${TMP_ENGINE_TAR_PATH}` \ | ||
&& mv -f ${TMP_ENGINE_TAR_PATH}/$dirname ${GEAFLOW_HOME} \ | ||
&& rm -rf ${TMP_ENGINE_TAR_PATH} | ||
|
||
ARG GEAFLOW_DEPLOY_LOG_DIR=/home/admin/logs/geaflow | ||
RUN mkdir -p ${GEAFLOW_DEPLOY_LOG_DIR} | ||
|
||
WORKDIR ${GEAFLOW_DEPLOY_LOG_DIR} | ||
|
||
COPY supervisord.conf /etc/supervisor/supervisord.conf | ||
COPY config.sh $GEAFLOW_HOME/bin/ | ||
COPY start-process.sh $GEAFLOW_HOME/bin/ | ||
COPY udf-downloader.py $GEAFLOW_HOME/bin/ | ||
COPY init-docker.sh /tmp/ | ||
ADD geaflow-service.conf /etc/supervisor/conf.d/geaflow.conf | ||
|
||
RUN /bin/bash /tmp/init-docker.sh | ||
|
||
EXPOSE 8090 6123 | ||
|
||
ENTRYPOINT ["/usr/bin/supervisord" , "-c" , "/etc/supervisor/supervisord.conf"] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# base image | ||
FROM ubuntu:20.04 | ||
|
||
# base package | ||
RUN apt-get update && apt-get install -y wget procps vim curl gcc gcc g++ supervisor | ||
|
||
# java | ||
RUN apt-get install -y openjdk-8-jdk \ | ||
&& echo "export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk" >> /etc/profile \ | ||
&& echo "export JRE_HOME=\${JAVA_HOME}/jre" >> /etc/profile \ | ||
&& . /etc/profile | ||
|
||
# environment variables | ||
ENV GEAFLOW_INSTALL_PATH=/opt | ||
ENV GEAFLOW_HOME=$GEAFLOW_INSTALL_PATH/geaflow | ||
ENV GEAFLOW_LIB_DIR=$GEAFLOW_HOME/lib \ | ||
GEAFLOW_CONF_DIR=$GEAFLOW_HOME/conf/ LANG="en_US.UTF-8" \ | ||
PATH=$PATH:$GEAFLOW_HOME/bin JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk | ||
ENV PATH=$JAVA_HOME/bin:${PATH} | ||
|
||
ARG ASYNC_PROFILER_DIR_NAME=async-profiler-2.8.1-linux-x64 | ||
ARG ASYNC_PROFILER_TAR_NAME=${ASYNC_PROFILER_DIR_NAME}.tar.gz | ||
RUN wget https://github.com/jvm-profiling-tools/async-profiler/releases/download/v2.8.1/${ASYNC_PROFILER_TAR_NAME} \ | ||
&& tar zxvf ${ASYNC_PROFILER_TAR_NAME} -C ${GEAFLOW_INSTALL_PATH} \ | ||
&& rm ${ASYNC_PROFILER_TAR_NAME} \ | ||
&& mv ${GEAFLOW_INSTALL_PATH}/${ASYNC_PROFILER_DIR_NAME} ${GEAFLOW_INSTALL_PATH}/async-profiler | ||
ENV ASYNC_PROFILER_SHELL_PATH=${GEAFLOW_INSTALL_PATH}/async-profiler/profiler.sh | ||
|
||
ARG TMP_ENGINE_TAR_PATH=${GEAFLOW_INSTALL_PATH}/engine_tar | ||
RUN mkdir -p ${TMP_ENGINE_TAR_PATH} | ||
# geaflow-engine-tar is the *.tar.gz file built by maven | ||
ARG geaflow_engine_tar=NOT_SET | ||
# Copy engine tar to tmp dir | ||
ADD $geaflow_engine_tar $TMP_ENGINE_TAR_PATH | ||
# Copy the extracted engine dir into geaflow dir. | ||
RUN dirname=`ls ${TMP_ENGINE_TAR_PATH}` \ | ||
&& mv -f ${TMP_ENGINE_TAR_PATH}/$dirname ${GEAFLOW_HOME} \ | ||
&& rm -rf ${TMP_ENGINE_TAR_PATH} | ||
|
||
ARG GEAFLOW_DEPLOY_LOG_DIR=/home/admin/logs/geaflow | ||
RUN mkdir -p ${GEAFLOW_DEPLOY_LOG_DIR} | ||
|
||
WORKDIR ${GEAFLOW_DEPLOY_LOG_DIR} | ||
|
||
COPY supervisord.conf /etc/supervisor/supervisord.conf | ||
COPY config.sh $GEAFLOW_HOME/bin/ | ||
COPY start-process.sh $GEAFLOW_HOME/bin/ | ||
COPY udf-downloader.py $GEAFLOW_HOME/bin/ | ||
COPY init-docker.sh /tmp/ | ||
ADD geaflow-service.conf /etc/supervisor/conf.d/geaflow.conf | ||
|
||
RUN /bin/bash /tmp/init-docker.sh | ||
|
||
EXPOSE 8090 6123 | ||
|
||
ENTRYPOINT ["/usr/bin/supervisord" , "-c" , "/etc/supervisor/supervisord.conf"] |