Skip to content

Commit

Permalink
Set JAVA_VERSION before using it during installation of JDK via SDKMAN (
Browse files Browse the repository at this point in the history
#873)

Motivation:

We need to set the JAVA_VERSION before trying to use it, otherwise we
might pick up the wrong version to install.

Modifications:

Ensure we set JAVA_VERSION first

Result:

SNAPSHOT deploys work again for debian
  • Loading branch information
normanmaurer authored Jun 25, 2024
1 parent b1827ee commit e642d7e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docker/Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ ENV NINJA_VERSION 1.7.2
ENV GO_VERSION 1.9.3
ENV GCC_VERSION 4.9.4

ARG java_version="8.0.302-zulu"
ENV JAVA_VERSION $java_version

# install dependencies
RUN echo "deb http://archive.debian.org/debian/ wheezy contrib main non-free" > /etc/apt/sources.list && \
echo "deb-src http://archive.debian.org/debian/ wheezy contrib main non-free" >> /etc/apt/sources.list && \
Expand Down Expand Up @@ -52,7 +55,6 @@ RUN wget -q --no-check-certificate https://github.com/netty/netty-tcnative/relea

RUN rm -rf $SOURCE_DIR


# Downloading and installing SDKMAN!
RUN echo '-k' > $HOME/.curlrc
RUN curl -s "https://get.sdkman.io" | bash
Expand All @@ -67,8 +69,6 @@ RUN bash -c "source $HOME/.sdkman/bin/sdkman-init.sh && \
rm -rf $HOME/.sdkman/archives/* && \
rm -rf $HOME/.sdkman/tmp/*"

ARG java_version="8.0.302-zulu"
ENV JAVA_VERSION $java_version

RUN echo 'export JAVA_HOME="/root/.sdkman/candidates/java/current"' >> ~/.bashrc
RUN echo 'PATH=$JAVA_HOME/bin:$PATH' >> ~/.bashrc
Expand Down

0 comments on commit e642d7e

Please sign in to comment.