Skip to content

Commit

Permalink
[KYUUBI #6762] [BUILD] cleanup dockerfile warnings
Browse files Browse the repository at this point in the history
# 🔍 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 🔖

- [ ] 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 ⚰️

#### Behavior With This Pull Request 🎉

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

d9d7b74 [Bowen Liang] cleanup dockerfile warning

Authored-by: Bowen Liang <[email protected]>
Signed-off-by: Bowen Liang <[email protected]>
  • Loading branch information
bowenliang123 committed Oct 22, 2024
1 parent 7cb6af1 commit e0a80f2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions build/Dockerfile.CI
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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}

Expand Down
8 changes: 4 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down

0 comments on commit e0a80f2

Please sign in to comment.