Skip to content

Commit

Permalink
[Improve] Illegal option -o pipefail bug fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfboys committed Feb 15, 2025
1 parent 8c9f5bc commit c256de1
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ ARG JAVA_MAJOR_VERSION=8
ARG TINI_VERSION=v0.19.0

# Base system setup
RUN set -euxo pipefail; \
apt-get update -qq && \
RUN apt-get update -qq && \
apt-get install -y --no-install-recommends \
software-properties-common \
ca-certificates \
Expand All @@ -43,13 +42,11 @@ RUN set -euxo pipefail; \
rm -rf /var/lib/apt/lists/*

# Configure Java environment
RUN set -euxo pipefail; \
ARCH=$(dpkg --print-architecture); \
RUN ARCH=$(dpkg --print-architecture); \
ln -sv "/usr/lib/jvm/java-${JAVA_MAJOR_VERSION}-openjdk-${ARCH}" "${JAVA_HOME}"

# Install docker
RUN set -euxo pipefail; \
mkdir -p /etc/apt/keyrings && \
RUN mkdir -p /etc/apt/keyrings && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
chmod a+r /etc/apt/keyrings/docker.gpg && \
Expand All @@ -69,8 +66,7 @@ RUN set -euxo pipefail; \

# Install Tini
ARG TARGETPLATFORM
RUN set -euxo pipefail; \
case "${TARGETPLATFORM}" in \
RUN case "${TARGETPLATFORM}" in \
"linux/amd64") ARCH=amd64 ;; \
"linux/arm64") ARCH=arm64 ;; \
*) echo "Unsupported platform: ${TARGETPLATFORM}"; exit 1 ;; \
Expand Down

0 comments on commit c256de1

Please sign in to comment.