fix: migrate dotnet from msft images to script install

This commit is contained in:
Ruben Fiszel
2025-09-29 09:44:04 +00:00
parent 8266fb84b0
commit cfec8e99fb
4 changed files with 21 additions and 9 deletions
+6 -2
View File
@@ -57,8 +57,12 @@ RUN apt-get update \
RUN rustup component add rustfmt
# C#
COPY --from=mcr.microsoft.com/dotnet/sdk:9.0 /usr/bin/dotnet /usr/bin/dotnet
ENV DOTNET_ROOT="/usr/bin"
RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh \
&& chmod +x dotnet-install.sh \
&& ./dotnet-install.sh --channel 9.0 --install-dir /usr/share/dotnet \
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \
&& rm dotnet-install.sh
# Nushell
COPY --from=ghcr.io/nushell/nushell:0.101.0-bookworm /usr/bin/nu /usr/bin/nu
+5 -3
View File
@@ -9,9 +9,11 @@ RUN /usr/local/cargo/bin/cargo install cargo-sweep --version ^0.7
RUN uv tool install ansible && [ -d "$(uv tool dir)/ansible/bin/" ] && find "$(uv tool dir)/ansible/bin/" -mindepth 1 -maxdepth 1 -type f -executable -regextype posix-extended -regex '^((.+/)?)[^.]+' -print0 | xargs -0 ln -s -t "$UV_TOOL_BIN_DIR/" || true
# C#
COPY --from=mcr.microsoft.com/dotnet/sdk:9.0 /usr/bin/dotnet /usr/bin/dotnet
ENV DOTNET_ROOT="/usr/bin"
RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh \
&& chmod +x dotnet-install.sh \
&& ./dotnet-install.sh --channel 9.0 --install-dir /usr/share/dotnet \
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \
&& rm dotnet-install.sh
# Nushell
COPY --from=ghcr.io/nushell/nushell:0.101.0-bookworm /usr/bin/nu /usr/bin/nu
+5 -2
View File
@@ -27,8 +27,11 @@ RUN /usr/local/cargo/bin/cargo install cargo-sweep --version ^0.7
# Ansible
RUN uv tool install ansible && [ -d "$(uv tool dir)/ansible/bin/" ] && find "$(uv tool dir)/ansible/bin/" -mindepth 1 -maxdepth 1 -type f -executable -regextype posix-extended -regex '^((.+/)?)[^.]+' -print0 | xargs -0 ln -s -t "$UV_TOOL_BIN_DIR/" || true
# dotnet SDK
COPY --from=mcr.microsoft.com/dotnet/sdk:9.0 /usr/bin/dotnet /usr/bin/dotnet
ENV DOTNET_ROOT="/usr/bin"
RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh \
&& chmod +x dotnet-install.sh \
&& ./dotnet-install.sh --channel 9.0 --install-dir /usr/share/dotnet \
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \
&& rm dotnet-install.sh
# Oracle DB Client
COPY --from=oracledb-client /opt/oracle/23/lib /opt/oracle/23/lib
+5 -2
View File
@@ -51,8 +51,11 @@ RUN /usr/local/cargo/bin/cargo install cargo-sweep --version ^0.7
RUN uv tool install ansible && [ -d "$(uv tool dir)/ansible/bin/" ] && find "$(uv tool dir)/ansible/bin/" -mindepth 1 -maxdepth 1 -type f -executable -regextype posix-extended -regex '^((.+/)?)[^.]+' -print0 | xargs -0 ln -s -t "$UV_TOOL_BIN_DIR/" || true
# dotnet SDK
COPY --from=mcr.microsoft.com/dotnet/sdk:9.0 /usr/bin/dotnet /usr/bin/dotnet
ENV DOTNET_ROOT="/usr/bin"
RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh \
&& chmod +x dotnet-install.sh \
&& ./dotnet-install.sh --channel 9.0 --install-dir /usr/share/dotnet \
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \
&& rm dotnet-install.sh
# Oracle DB Client
COPY --from=oracledb-client /opt/oracle/23/lib /opt/oracle/23/lib