From e0a80f265003f484595facfbde92191bf309fd61 Mon Sep 17 00:00:00 2001 From: Bowen Liang Date: Tue, 22 Oct 2024 13:38:02 +0800 Subject: [PATCH] [KYUUBI #6762] [BUILD] cleanup dockerfile warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # :mag: Description ## Issue References ๐Ÿ”— This pull request fixes # ## Describe Your Solution ๐Ÿ”ง - fix the dockerfile warning reported by `GitHub Actions / Kyuubi Server On Kubernetes Integration Test` : - Legacy key/value format with whitespace separator should not be used LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/ - The 'as' keyword should match the case of the 'from' keyword FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/ ## Types of changes :bookmark: - [ ] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan ๐Ÿงช #### Behavior Without This Pull Request :coffin: #### Behavior With This Pull Request :tada: #### Related Unit Tests --- # Checklist ๐Ÿ“ - [ ] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) **Be nice. Be informative.** Closes #6762 from bowenliang123/docker-warning. Closes #6762 d9d7b7465 [Bowen Liang] cleanup dockerfile warning Authored-by: Bowen Liang Signed-off-by: Bowen Liang --- build/Dockerfile.CI | 12 ++++++------ docker/Dockerfile | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/build/Dockerfile.CI b/build/Dockerfile.CI index 3209a143f..b7a452c30 100644 --- a/build/Dockerfile.CI +++ b/build/Dockerfile.CI @@ -33,7 +33,7 @@ # see: https://github.com/moby/moby/issues/38379 ARG BASE_IMAGE=eclipse-temurin:8-jdk-focal -FROM eclipse-temurin:8-jdk-focal as builder +FROM eclipse-temurin:8-jdk-focal AS builder ARG MVN_ARG @@ -43,7 +43,7 @@ ARG MVN_ARG # 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} +ENV CI=${CI} ADD . /workspace/kyuubi WORKDIR /workspace/kyuubi @@ -64,10 +64,10 @@ ARG kyuubi_uid=10009 USER root -ENV KYUUBI_HOME /opt/kyuubi -ENV KYUUBI_LOG_DIR ${KYUUBI_HOME}/logs -ENV KYUUBI_PID_DIR ${KYUUBI_HOME}/pid -ENV KYUUBI_WORK_DIR_ROOT ${KYUUBI_HOME}/work +ENV KYUUBI_HOME=/opt/kyuubi +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} diff --git a/docker/Dockerfile b/docker/Dockerfile index 88adcbe65..e9d741e38 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -40,10 +40,10 @@ FROM builder_${spark_provided} ARG kyuubi_uid=10009 USER root -ENV KYUUBI_HOME /opt/kyuubi -ENV KYUUBI_LOG_DIR ${KYUUBI_HOME}/logs -ENV KYUUBI_PID_DIR ${KYUUBI_HOME}/pid -ENV KYUUBI_WORK_DIR_ROOT ${KYUUBI_HOME}/work +ENV KYUUBI_HOME=/opt/kyuubi +ENV KYUUBI_LOG_DIR=${KYUUBI_HOME}/logs +ENV KYUUBI_PID_DIR=${KYUUBI_HOME}/pid +ENV KYUUBI_WORK_DIR_ROOT=${KYUUBI_HOME}/work RUN set -ex && \ sed -i 's/http:\/\/deb.\(.*\)/https:\/\/deb.\1/g' /etc/apt/sources.list && \