From 9623b03f27cf511a6ab4d76c2e2724e69241cbac Mon Sep 17 00:00:00 2001 From: roleyfoley Date: Tue, 26 Mar 2024 10:02:41 +1100 Subject: [PATCH] fix: minor updates to docker image --- Dockerfile | 15 +++++---------- scripts/user_env/0_jenv.sh | 3 ++- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index af3bd46..8c74821 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,11 +40,8 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ && rm -rf /var/lib/apt/lists/ # Add various java versions via apt-get -RUN curl -fsSL https://packages.adoptium.net/artifactory/api/gpg/key/public | apt-key add - \ - && add-apt-repository \ - "deb [arch=amd64] https://packages.adoptium.net/artifactory/deb \ - $(lsb_release -cs) \ - main" +RUN wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor | tee /etc/apt/trusted.gpg.d/adoptium.gpg > /dev/null \ + && echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list RUN apt-get update && apt-get install --no-install-recommends -y \ temurin-11-jdk temurin-17-jdk\ @@ -150,11 +147,9 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ && rm -rf /var/lib/apt/lists/ # Add various java versions via apt-get -RUN curl -fsSL https://packages.adoptium.net/artifactory/api/gpg/key/public | apt-key add - \ - && add-apt-repository \ - "deb [arch=amd64] https://packages.adoptium.net/artifactory/deb \ - $(lsb_release -cs) \ - main" +RUN wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor | tee /etc/apt/trusted.gpg.d/adoptium.gpg > /dev/null \ + && echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list + # Fix for slim docker images not including the man directories RUN mkdir -p /usr/share/man/man1 diff --git a/scripts/user_env/0_jenv.sh b/scripts/user_env/0_jenv.sh index 6b194ff..e73a2f8 100755 --- a/scripts/user_env/0_jenv.sh +++ b/scripts/user_env/0_jenv.sh @@ -7,8 +7,9 @@ git clone --depth 1 https://github.com/jenv/jenv.git "${JENV_ROOT}" # pyenv install eval "$(jenv init -)" + jenv add /usr/lib/jvm/temurin-11-jdk-amd64/ jenv add /usr/lib/jvm/temurin-17-jdk-amd64/ +jenv doctor jenv global system -jenv enable-plugin maven