Skip to content

Commit

Permalink
Install JDK 8,11,17,21 via AWS Corretto
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchTalmadge committed Oct 30, 2023
1 parent c6b36f1 commit 7faecdb
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,15 @@ RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
/var/lib/apt/lists/* \
/var/tmp/*

# Install Adoptium JDK
RUN wget -qO- https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor > /usr/share/keyrings/adoptium.gpg && \
echo "deb [signed-by=/usr/share/keyrings/adoptium.gpg] https://packages.adoptium.net/artifactory/deb bookworm main" > /etc/apt/sources.list.d/adoptium.list && \
# Install Corretto JDK
RUN wget -O- https://apt.corretto.aws/corretto.key | gpg --dearmor > /etc/apt/trusted.gpg.d/corretto.gpg && \
add-apt-repository "deb https://apt.corretto.aws stable main" && \
apt-get update && \
apt-get install -y temurin-8-jdk temurin-11-jdk temurin-17-jdk && \
apt-get install -y \
java-1.8.0-amazon-corretto-jdk \
java-11-amazon-corretto-jdk \
java-17-amazon-corretto-jdk \
java-21-amazon-corretto-jdk && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

Expand Down

0 comments on commit 7faecdb

Please sign in to comment.