Skip to content

Commit

Permalink
Revert "Sync Actions Dockerfile with rabbitmq/delete-release-action"
Browse files Browse the repository at this point in the history
This reverts commit c49af81.
  • Loading branch information
michaelklishin committed Nov 8, 2024
1 parent cfcdc34 commit 7edaa41
Showing 1 changed file with 4 additions and 36 deletions.
40 changes: 4 additions & 36 deletions Dockerfile-github
Original file line number Diff line number Diff line change
Expand Up @@ -16,47 +16,15 @@ RUN ARCH="x86"; BUNDLE="jdk"; \
RUN wget --progress=bar:force:noscroll -O "jdk.tar.gz" $(cat jdk-info.json | jq --raw-output .url)
RUN echo "$(cat jdk-info.json | jq --raw-output .sha256_hash) *jdk.tar.gz" | sha256sum --check --strict -

ENV JAVA_HOME="/usr/lib/jdk-$JAVA_VERSION"

RUN set -eux; \
mkdir $JAVA_HOME && \
tar --extract --file jdk.tar.gz --directory "$JAVA_HOME" --strip-components 1; \
$JAVA_HOME/bin/jlink --compress=zip-6 --output /jre --add-modules java.base,jdk.crypto.cryptoki,java.net.http; \
JAVA_PATH="/usr/lib/jdk-$JAVA_VERSION"; \
mkdir $JAVA_PATH && \
tar --extract --file jdk.tar.gz --directory "$JAVA_PATH" --strip-components 1; \
$JAVA_PATH/bin/jlink --compress=zip-6 --output /jre --add-modules java.base,jdk.crypto.cryptoki,java.net.http; \
/jre/bin/java -version \
; \
mkdir -p /app

RUN mkdir -p /project/src /project/.mvn
COPY src /project/src
COPY .mvn /project/.mvn
COPY pom.xml /project
COPY mvnw /project

WORKDIR /project
RUN set -eux; \
./mvnw package -Dmaven.test.skip --no-transfer-progress

FROM ubuntu:24.04

RUN set -eux; \
\
apt-get update; \
apt-get -y upgrade; \
apt-get install --yes --no-install-recommends \
ca-certificates \
; \
rm -rf /var/lib/apt/lists/*

ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en

ENV JAVA_HOME=/usr/lib/jvm/java-21-openjdk/jre
RUN mkdir -p $JAVA_HOME
COPY --from=builder /jre $JAVA_HOME/
RUN ln -svT $JAVA_HOME/bin/java /usr/local/bin/java

RUN mkdir -p /app

COPY target/cloudsmith-ci-connector.jar /app

FROM ubuntu:24.04
Expand Down

0 comments on commit 7edaa41

Please sign in to comment.