Skip to content

Commit

Permalink
Remove sdkman from dotnet6 image
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhu Subramanian <[email protected]>
  • Loading branch information
prabhu committed Sep 3, 2024
1 parent fa95f23 commit 2d54ae8
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions sle/Dockerfile.dotnet
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
FROM registry.suse.com/bci/dotnet-sdk:6.0

ARG JAVA_VERSION=22.0.2-tem

ENV DOTNET_GENERATE_ASPNET_CERTIFICATE=false \
DOTNET_NOLOGO=true \
DOTNET_USE_POLLING_FILE_WATCHER=true \
NUGET_XMLDOC_MODE=skip \
DOTNET_RUNNING_IN_CONTAINER=true \
DOTNET_CLI_TELEMETRY_OPTOUT=1 \
JAVA_VERSION=$JAVA_VERSION \
JAVA_HOME="/opt/java/${JAVA_VERSION}"
ENV PATH=${PATH}:${JAVA_HOME}/bin:/usr/local/bin:
DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV PATH=${PATH}:/usr/local/bin:

RUN zypper refresh && zypper --non-interactive update && zypper --non-interactive install -l --no-recommends git-core nodejs20 npm20 \
python311 python311-pip wget zip unzip make gawk \
RUN zypper --non-interactive install -l --no-recommends git-core nodejs20 npm20 \
python311 python311-pip wget zip unzip make gawk java-21-openjdk-devel \
&& rpm -Uvh https://packages.microsoft.com/config/sles/15/packages-microsoft-prod.rpm \
&& zypper --non-interactive install -l --no-recommends dotnet-sdk-3.1 \
&& zypper --non-interactive addrepo -G -f -K https://download.opensuse.org/repositories/Mono/SLE_15_SP1/Mono.repo \
Expand All @@ -23,13 +19,6 @@ RUN zypper refresh && zypper --non-interactive update && zypper --non-interactiv
&& chmod +x /usr/bin/nuget \
&& rm -rf /usr/lib/mono/nuget \
&& dotnet --list-sdks \
&& curl -s "https://get.sdkman.io" | bash \
&& echo -e "sdkman_auto_answer=true\nsdkman_selfupdate_feature=false\nsdkman_auto_env=true\nsdkman_curl_connect_timeout=60\nsdkman_curl_max_time=0" >> $HOME/.sdkman/etc/config \
&& source "$HOME/.sdkman/bin/sdkman-init.sh" \
&& sdk install java $JAVA_VERSION \
&& sdk offline enable \
&& mv /root/.sdkman/candidates/* /opt/ \
&& rm -rf /root/.sdkman \
&& zypper clean -a
COPY nuget /usr/lib/mono/nuget
CMD /bin/bash

0 comments on commit 2d54ae8

Please sign in to comment.