You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@linkis.apache.org by GitBox <gi...@apache.org> on 2022/07/13 03:17:37 UTC

[GitHub] [incubator-linkis] AaronLinOops commented on a diff in pull request #2447: [Feature] Add Dockerfile to linkis-dist module for both linkis backends and web

AaronLinOops commented on code in PR #2447:
URL: https://github.com/apache/incubator-linkis/pull/2447#discussion_r919611850


##########
linkis-dist/docker/Dockerfile:
##########
@@ -0,0 +1,99 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################
+# linkis image
+######################################################################
+
+ARG IMAGE_BASE=centos:7
+ARG IMAGE_BASE_WEB=nginx:1.19.6
+
+FROM ${IMAGE_BASE} as linkis
+
+ARG BUILD_TYPE=dev
+
+ARG JDK_VERSION=1.8.0-openjdk
+ARG JDK_BUILD_REVISION=1.8.0.332.b09-1.el7_9
+
+ARG MYSQL_JDBC_VERSION=5.1.49
+
+ARG LINKIS_VERSION=0.0.0
+ARG LINKIS_SYSTEM_USER="hadoop"
+ARG LINKIS_SYSTEM_UID="9001"
+
+ARG LINKIS_HOME=/opt/linkis
+ARG LINKIS_CONF_DIR=/etc/linkis-conf
+ARG LINKIS_LOG_DIR=/var/logs/linkis
+
+WORKDIR ${LINKIS_HOME}
+
+RUN useradd -r -s /bin/bash -u ${LINKIS_SYSTEM_UID} -g root -G wheel ${LINKIS_SYSTEM_USER}
+
+# TODO: remove install mysql client when schema-init-tools is ready
+RUN yum install -y \
+       vim unzip curl sudo krb5-workstation sssd crontabs python-pip \
+       java-${JDK_VERSION}-${JDK_BUILD_REVISION} \
+       java-${JDK_VERSION}-devel-${JDK_BUILD_REVISION} \
+       mysql \
+    && yum clean all
+
+RUN sed -i "s#^%wheel.*#%wheel        ALL=(ALL)       NOPASSWD: ALL#g" /etc/sudoers
+
+RUN mkdir -p /opt/tmp \
+    && mkdir -p ${LINKIS_CONF_DIR} \
+    && mkdir -p ${LINKIS_LOG_DIR}
+
+ENV JAVA_HOME /etc/alternatives/jre
+ENV LINKIS_CONF_DIR ${LINKIS_CONF_DIR}
+ENV LINKIS_CLIENT_CONF_DIR ${LINKIS_CONF_DIR}
+ENV LINKIS_HOME ${LINKIS_HOME}
+
+ADD apache-linkis-${LINKIS_VERSION}-incubating-bin.tar.gz /opt/tmp/
+
+# Put mysql-connector-java-*.jar package into the image only in development mode
+RUN if [ "$BUILD_TYPE" = "dev" ] ; then \
+      curl -L -o /opt/tmp/mysql-connector-java-${MYSQL_JDBC_VERSION}.jar \
+        https://repo1.maven.org/maven2/mysql/mysql-connector-java/${MYSQL_JDBC_VERSION}/mysql-connector-java-${MYSQL_JDBC_VERSION}.jar; \

Review Comment:
   good catch



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org