zhoulii commented on a change in pull request #3859:
URL: https://github.com/apache/zeppelin/pull/3859#discussion_r471309367



##########
File path: scripts/docker/zeppelin-interpreter/Dockerfile
##########
@@ -0,0 +1,80 @@
+# 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.
+
+FROM zeppelin-distribution:latest AS zeppelin-distribution
+
+FROM ubuntu:20.04
+
+LABEL maintainer="Apache Software Foundation <dev@zeppelin.apache.org>"
+
+ARG version="0.9.0-SNAPSHOT"
+
+ENV VERSION="${version}" \
+    Z_HOME="/opt/zeppelin"
+
+RUN set -ex && \
+    apt-get -y update && \
+    DEBIAN_FRONTEND=noninteractive apt-get install -y openjdk-8-jre-headless 
wget && \
+    # Cleanup
+    rm -rf /var/lib/apt/lists/* && \
+    apt-get autoclean && \
+    apt-get clean
+
+COPY --from=zeppelin-distribution /opt/zeppelin/bin ${Z_HOME}/bin
+COPY log4j.properties ${Z_HOME}/conf/
+COPY log4j_yarn_cluster.properties ${Z_HOME}/conf/
+# Decide:
+## 1) Build a huge image with all interpreters (default)
+COPY --from=zeppelin-distribution /opt/zeppelin/interpreter 
${Z_HOME}/interpreter
+## 2) Build an image with only some interpreters
+#### Copy interpreter-shaded JAR, needed for all interpreters
+### COPY --from=zeppelin-distribution 
/opt/zeppelin/interpreter/zeppelin-interpreter-shaded-${VERSION}.jar 
${Z_HOME}/interpreter/zeppelin-interpreter-shaded-${VERSION}.jar
+#### Copy specific interpreters,  replace "${interpreter_name}" with your 
interpreter. Of course you can repeat the line with defferent interpreter
+### COPY --from=zeppelin-distribution 
/opt/zeppelin/interpreter/${interpreter_name}  
${Z_HOME}/interpreter/${interpreter_name}
+

Review comment:
       we should create directory `${Z_HOME}/logs` first or set USER to root, 
otherwise  when starting interpreter-server, we would meet this error:
   
   `Container ENTRYPOINT failed to add passwd entry for anonymous UID
   Log dir doesn't exist, create /opt/zeppelin/logs
   mkdir: cannot create directory '/opt/zeppelin/logs': Permission denied`




----------------------------------------------------------------
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.

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


Reply via email to