From cfec8e99fb55928dfed3b7e80fb63cc279553dec Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 29 Sep 2025 09:44:04 +0000 Subject: [PATCH] fix: migrate dotnet from msft images to script install --- .github/DockerfileBackendTests | 8 ++++++-- docker/DockerfileFull | 8 +++++--- docker/DockerfileFullEe | 7 +++++-- docker/DockerfileNsjail | 7 +++++-- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/.github/DockerfileBackendTests b/.github/DockerfileBackendTests index dd1b051136..334656a9c2 100644 --- a/.github/DockerfileBackendTests +++ b/.github/DockerfileBackendTests @@ -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 diff --git a/docker/DockerfileFull b/docker/DockerfileFull index 0b24e09cb2..5ca64d5f51 100644 --- a/docker/DockerfileFull +++ b/docker/DockerfileFull @@ -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 diff --git a/docker/DockerfileFullEe b/docker/DockerfileFullEe index 0e4889ce0d..cf420e1962 100644 --- a/docker/DockerfileFullEe +++ b/docker/DockerfileFullEe @@ -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 diff --git a/docker/DockerfileNsjail b/docker/DockerfileNsjail index f11d3fbf60..26116499c9 100644 --- a/docker/DockerfileNsjail +++ b/docker/DockerfileNsjail @@ -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