Skip to content

Commit 5318585

Browse files
committed
[KYUUBI #4288] Use eclipse-temurin:8-jdk-focal as default base image
### _Why are the changes needed?_ eclipse-temurin is the successor for openjdk, see apache/spark#37705 "The core change is: the OS of base image changes debian-bullseye to ubuntu-focal (based on debian bullseye)." ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [ ] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request Closes #4288 from pan3793/image. Closes #4288 b7b6190 [Cheng Pan] Use eclipse-temurin:8-jdk-focal as default base image Authored-by: Cheng Pan <chengpan@apache.org> Signed-off-by: Cheng Pan <chengpan@apache.org>
1 parent 8d269b8 commit 5318585

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

build/Dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929

3030
# Declare the BASE_IMAGE argument in the first line, for more detail
3131
# see: https://github.com/moby/moby/issues/38379
32-
ARG BASE_IMAGE=openjdk:8-jdk
32+
ARG BASE_IMAGE=eclipse-temurin:8-jdk-focal
3333

34-
FROM maven:3.6-jdk-8 as builder
34+
FROM eclipse-temurin:8-jdk-focal as builder
3535

3636
ARG MVN_ARG
3737

@@ -48,7 +48,8 @@ WORKDIR /workspace/kyuubi
4848

4949
RUN apt-get update && \
5050
DEBIAN_FRONTEND=noninteractive \
51-
apt-get install -y python3 && \
51+
apt-get install -y bash python3 && \
52+
ln -snf /bin/bash /bin/sh && \
5253
./build/dist ${MVN_ARG} && \
5354
mv /workspace/kyuubi/dist /opt/kyuubi && \
5455
# Removing stuff saves time because docker creates a temporary layer
@@ -71,7 +72,8 @@ COPY --from=builder /opt/kyuubi ${KYUUBI_HOME}
7172
RUN set -ex && \
7273
apt-get update && \
7374
DEBIAN_FRONTEND=noninteractive \
74-
apt install -y bash tini libc6 libpam-modules krb5-user libnss3 procps && \
75+
apt-get install -y bash tini libc6 libpam-modules krb5-user libnss3 procps && \
76+
ln -snf /bin/bash /bin/sh && \
7577
useradd -u ${kyuubi_uid} -g root kyuubi && \
7678
mkdir -p ${KYUUBI_HOME} ${KYUUBI_LOG_DIR} ${KYUUBI_PID_DIR} ${KYUUBI_WORK_DIR_ROOT} && \
7779
chmod ug+rw -R ${KYUUBI_HOME} && \

docker/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# -t the target repo and tag name
2525
# more options can be found with -h
2626

27-
ARG BASE_IMAGE=openjdk:8-jre-slim
27+
ARG BASE_IMAGE=eclipse-temurin:8-jdk-focal
2828
ARG spark_provided="spark_builtin"
2929

3030
FROM ${BASE_IMAGE} as builder_spark_provided
@@ -34,7 +34,7 @@ ONBUILD ENV SPARK_HOME ${spark_home_in_docker}
3434
FROM ${BASE_IMAGE} as builder_spark_builtin
3535

3636
ONBUILD ENV SPARK_HOME /opt/spark
37-
ONBUILD RUN mkdir -p ${SPARK_HOME}
37+
ONBUILD RUN mkdir -p ${SPARK_HOME}
3838
ONBUILD COPY spark-binary ${SPARK_HOME}
3939

4040
FROM builder_${spark_provided}
@@ -50,7 +50,8 @@ ENV KYUUBI_WORK_DIR_ROOT ${KYUUBI_HOME}/work
5050
RUN set -ex && \
5151
sed -i 's/http:\/\/deb.\(.*\)/https:\/\/deb.\1/g' /etc/apt/sources.list && \
5252
apt-get update && \
53-
apt install -y bash tini libc6 libpam-modules krb5-user libnss3 procps && \
53+
apt-get install -y bash tini libc6 libpam-modules krb5-user libnss3 procps && \
54+
ln -snf /bin/bash /bin/sh && \
5455
useradd -u ${kyuubi_uid} -g root kyuubi -d /home/kyuubi -m && \
5556
mkdir -p ${KYUUBI_HOME} ${KYUUBI_LOG_DIR} ${KYUUBI_PID_DIR} ${KYUUBI_WORK_DIR_ROOT} && \
5657
rm -rf /var/cache/apt/*

tools/spark-block-cleaner/kubernetes/docker/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616
#
17-
FROM openjdk:8-jre-slim
17+
FROM eclipse-temurin:8-jdk-focal
1818

1919
RUN apt-get update && \
2020
apt install -y tini && \
21+
rm -rf /var/cache/apt/* && \
2122
mkdir /data && \
2223
mkdir -p /opt/block-cleaner && \
2324
mkdir -p /log/cleanerLog

0 commit comments

Comments
 (0)