ulysses-you commented on a change in pull request #1435:
URL: https://github.com/apache/incubator-kyuubi/pull/1435#discussion_r756645090
##########
File path: docker/Dockerfile
##########
@@ -16,65 +16,44 @@
#
# Usage:
-# Run the docker command below
-# docker build \
-# --build-arg MVN_ARG="-Pspark-3.1,spark-hadoop-3.2" \
-# --file docker/Dockerfile \
-# --tag apache/kyuubi:tagname \
-# .
+# 1. use ./build/dist to make binary distributions of Kyuubi or download a
release
+# 2. Untar it and run the docker command below
+# docker build -f docker/Dockerfile -t yaooqinn/kyuubi:tagname .
# Options:
-# -f, --file this docker file
-# -t, --tag the target repo and tag name
-# more options can be found with -h, --help
+# -f this docker file
+# -t the target repo and tag name
+# more options can be found with -h
+# TODO: REPALCE it with offical spark image iff Apache Spark community deploy
+# Or make one after kyuubi to be setup under ASF
Review comment:
remove todo
##########
File path: docker/Dockerfile
##########
@@ -16,65 +16,44 @@
#
# Usage:
-# Run the docker command below
-# docker build \
-# --build-arg MVN_ARG="-Pspark-3.1,spark-hadoop-3.2" \
-# --file docker/Dockerfile \
-# --tag apache/kyuubi:tagname \
-# .
+# 1. use ./build/dist to make binary distributions of Kyuubi or download a
release
+# 2. Untar it and run the docker command below
+# docker build -f docker/Dockerfile -t yaooqinn/kyuubi:tagname .
Review comment:
docker build -f docker/Dockerfile -t repository:tagname .
##########
File path: docker/Dockerfile
##########
@@ -16,65 +16,44 @@
#
# Usage:
-# Run the docker command below
-# docker build \
-# --build-arg MVN_ARG="-Pspark-3.1,spark-hadoop-3.2" \
-# --file docker/Dockerfile \
-# --tag apache/kyuubi:tagname \
-# .
+# 1. use ./build/dist to make binary distributions of Kyuubi or download a
release
+# 2. Untar it and run the docker command below
+# docker build -f docker/Dockerfile -t yaooqinn/kyuubi:tagname .
# Options:
-# -f, --file this docker file
-# -t, --tag the target repo and tag name
-# more options can be found with -h, --help
+# -f this docker file
+# -t the target repo and tag name
+# more options can be found with -h
+# TODO: REPALCE it with offical spark image iff Apache Spark community deploy
+# Or make one after kyuubi to be setup under ASF
-# Declare the BASE_IMAGE argument in the first line, for more detail
-# see: https://github.com/moby/moby/issues/38379
-ARG BASE_IMAGE=openjdk:8-jdk
-
-FROM maven:3.6-jdk-8 as builder
-
-ARG MVN_ARG
-
-# Pass the environment variable `CI` into container, for internal use only.
-#
-# Continuous integration(aka. CI) services like GitHub Actions, Travis always
provide
-# an environment variable `CI` in runners, and we detect this variable to run
some
-# specific actions, e.g. run `mvn` in batch mode to suppress noisy logs.
-ARG CI
-ENV CI ${CI}
-
-ADD . /workspace/kyuubi
-WORKDIR /workspace/kyuubi
-
-RUN ./build/dist ${MVN_ARG} && \
- mv /workspace/kyuubi/dist /opt/kyuubi && \
- # Removing stuff saves time because docker creates a temporary layer
- rm -rf ~/.m2 && \
- rm -rf /workspace/kyuubi
-
-FROM ${BASE_IMAGE}
+ARG BASE_IMAGE=8-jre-slim
+FROM openjdk:${BASE_IMAGE}
ARG kyuubi_uid=10009
USER root
ENV KYUUBI_HOME /opt/kyuubi
+ENV SPARK_HOME /opt/spark
ENV KYUUBI_LOG_DIR ${KYUUBI_HOME}/logs
ENV KYUUBI_PID_DIR ${KYUUBI_HOME}/pid
ENV KYUUBI_WORK_DIR_ROOT ${KYUUBI_HOME}/work
-COPY --from=builder /opt/kyuubi ${KYUUBI_HOME}
-
RUN set -ex && \
+ sed -i 's/http:\/\/deb.\(.*\)/https:\/\/deb.\1/g' /etc/apt/sources.list &&
\
apt-get update && \
- DEBIAN_FRONTEND=noninteractive \
apt install -y bash tini libc6 libpam-modules krb5-user libnss3 procps && \
useradd -u ${kyuubi_uid} -g root kyuubi && \
mkdir -p ${KYUUBI_HOME} ${KYUUBI_LOG_DIR} ${KYUUBI_PID_DIR}
${KYUUBI_WORK_DIR_ROOT} && \
chmod ug+rw -R ${KYUUBI_HOME} && \
chmod a+rwx -R ${KYUUBI_WORK_DIR_ROOT} && \
rm -rf /var/cache/apt/*
+COPY spark /opt/spark
Review comment:
spark is too common, how about `spark-binary` ?
`COPY spark-binary ${SPARK_HOME}`
##########
File path: docker/Dockerfile
##########
@@ -63,18 +38,21 @@ ENV KYUUBI_LOG_DIR ${KYUUBI_HOME}/logs
ENV KYUUBI_PID_DIR ${KYUUBI_HOME}/pid
ENV KYUUBI_WORK_DIR_ROOT ${KYUUBI_HOME}/work
-COPY --from=builder /opt/kyuubi ${KYUUBI_HOME}
-
RUN set -ex && \
+ sed -i 's/http:\/\/deb.\(.*\)/https:\/\/deb.\1/g' /etc/apt/sources.list &&
\
apt-get update && \
- DEBIAN_FRONTEND=noninteractive \
apt install -y bash tini libc6 libpam-modules krb5-user libnss3 procps && \
useradd -u ${kyuubi_uid} -g root kyuubi && \
mkdir -p ${KYUUBI_HOME} ${KYUUBI_LOG_DIR} ${KYUUBI_PID_DIR}
${KYUUBI_WORK_DIR_ROOT} && \
chmod ug+rw -R ${KYUUBI_HOME} && \
chmod a+rwx -R ${KYUUBI_WORK_DIR_ROOT} && \
rm -rf /var/cache/apt/*
+COPY bin ${KYUUBI_HOME}/bin
+COPY conf ${KYUUBI_HOME}/conf
+COPY jars ${KYUUBI_HOME}/jars
+COPY externals/engines/spark ${KYUUBI_HOME}/externals/engines/spark
Review comment:
so we don't need this anymore
##########
File path: docker/Dockerfile
##########
@@ -16,65 +16,44 @@
#
# Usage:
-# Run the docker command below
-# docker build \
-# --build-arg MVN_ARG="-Pspark-3.1,spark-hadoop-3.2" \
-# --file docker/Dockerfile \
-# --tag apache/kyuubi:tagname \
-# .
+# 1. use ./build/dist to make binary distributions of Kyuubi or download a
release
+# 2. Untar it and run the docker command below
+# docker build -f docker/Dockerfile -t yaooqinn/kyuubi:tagname .
# Options:
-# -f, --file this docker file
-# -t, --tag the target repo and tag name
-# more options can be found with -h, --help
+# -f this docker file
+# -t the target repo and tag name
+# more options can be found with -h
+# TODO: REPALCE it with offical spark image iff Apache Spark community deploy
+# Or make one after kyuubi to be setup under ASF
-# Declare the BASE_IMAGE argument in the first line, for more detail
-# see: https://github.com/moby/moby/issues/38379
-ARG BASE_IMAGE=openjdk:8-jdk
-
-FROM maven:3.6-jdk-8 as builder
-
-ARG MVN_ARG
-
-# Pass the environment variable `CI` into container, for internal use only.
-#
-# Continuous integration(aka. CI) services like GitHub Actions, Travis always
provide
-# an environment variable `CI` in runners, and we detect this variable to run
some
-# specific actions, e.g. run `mvn` in batch mode to suppress noisy logs.
-ARG CI
-ENV CI ${CI}
-
-ADD . /workspace/kyuubi
-WORKDIR /workspace/kyuubi
-
-RUN ./build/dist ${MVN_ARG} && \
- mv /workspace/kyuubi/dist /opt/kyuubi && \
- # Removing stuff saves time because docker creates a temporary layer
- rm -rf ~/.m2 && \
- rm -rf /workspace/kyuubi
-
-FROM ${BASE_IMAGE}
+ARG BASE_IMAGE=8-jre-slim
+FROM openjdk:${BASE_IMAGE}
ARG kyuubi_uid=10009
USER root
ENV KYUUBI_HOME /opt/kyuubi
+ENV SPARK_HOME /opt/spark
ENV KYUUBI_LOG_DIR ${KYUUBI_HOME}/logs
ENV KYUUBI_PID_DIR ${KYUUBI_HOME}/pid
ENV KYUUBI_WORK_DIR_ROOT ${KYUUBI_HOME}/work
-COPY --from=builder /opt/kyuubi ${KYUUBI_HOME}
-
RUN set -ex && \
+ sed -i 's/http:\/\/deb.\(.*\)/https:\/\/deb.\1/g' /etc/apt/sources.list &&
\
apt-get update && \
- DEBIAN_FRONTEND=noninteractive \
apt install -y bash tini libc6 libpam-modules krb5-user libnss3 procps && \
useradd -u ${kyuubi_uid} -g root kyuubi && \
mkdir -p ${KYUUBI_HOME} ${KYUUBI_LOG_DIR} ${KYUUBI_PID_DIR}
${KYUUBI_WORK_DIR_ROOT} && \
Review comment:
`SPARK_HOME` ?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]