diff --git a/2023.3/base/dotnet.community.Dockerfile b/2023.3/base/dotnet.community.Dockerfile index 793d6416..847b81a6 100644 --- a/2023.3/base/dotnet.community.Dockerfile +++ b/2023.3/base/dotnet.community.Dockerfile @@ -1,18 +1,31 @@ ARG DOTNET_BASE_TAG="6.0-bullseye-slim" FROM mcr.microsoft.com/dotnet/sdk:$DOTNET_BASE_TAG +ENV QODANA_DATA="/data" \ + QODANA_DOCKER="true" \ + PATH="/opt/qodana:${PATH}" + +ENV DOTNET_ROOT="/usr/share/dotnet" + +# Not using the URL https://dot.net/v1/dotnet-install.sh because of https://github.com/dotnet/install-scripts/issues/276 ARG DOTNET_INSTALL_SH_REVISION="40434288dc5bbda41eafcbcbbc5c0fbbe028fb30" ARG DOTNET_CHANNEL_A="7.0" ARG DOTNET_CHANNEL_B="6.0" ARG DOTNET_CHANNEL_C="8.0" -ENV PATH="/opt/qodana:${PATH}" -ENV DOTNET_ROOT="/usr/share/dotnet" -ENV QODANA_DOCKER true - -RUN apt-get update && apt-get install -y git default-jre && \ - rm -rf /var/lib/apt/lists/* && mkdir -p /opt/qodana && \ - mkdir -p /data/project && mkdir -p /data/cache && mkdir -p /data/results && \ +# hadolint ignore=SC2174,DL3009 +RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \ + --mount=target=/var/cache/apt,type=cache,sharing=locked \ + rm -f /etc/apt/apt.conf.d/docker-clean && \ + mkdir -m 777 -p /opt/qodana /data/project /data/cache /data/results && apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates=20210119 \ + curl=7.74.0-1.3+deb11u11 \ + default-jre=2:1.11-72 \ + git=1:2.30.2-1+deb11u2 \ + git-lfs=2.13.2-1+b5 \ + gnupg2=2.2.27-2+deb11u2 && \ + apt-get autoremove -y && apt-get clean && \ curl -fsSL -o /tmp/dotnet-install.sh \ "https://raw.githubusercontent.com/dotnet/install-scripts/$DOTNET_INSTALL_SH_REVISION/src/dotnet-install.sh" && \ echo "d9ede6126a6da49cd3509e5fc8236f79addf175696f29d01f38840fd84663514 /tmp/dotnet-install.sh" > /tmp/shasum && \ diff --git a/2023.3/dotnet-community/Dockerfile b/2023.3/dotnet-community/Dockerfile index d01682f9..3e31f8f3 100644 --- a/2023.3/dotnet-community/Dockerfile +++ b/2023.3/dotnet-community/Dockerfile @@ -1,18 +1,31 @@ ARG DOTNET_BASE_TAG="6.0-bullseye-slim" FROM mcr.microsoft.com/dotnet/sdk:$DOTNET_BASE_TAG +ENV QODANA_DATA="/data" \ + QODANA_DOCKER="true" \ + PATH="/opt/qodana:${PATH}" + +ENV DOTNET_ROOT="/usr/share/dotnet" + +# Not using the URL https://dot.net/v1/dotnet-install.sh because of https://github.com/dotnet/install-scripts/issues/276 ARG DOTNET_INSTALL_SH_REVISION="40434288dc5bbda41eafcbcbbc5c0fbbe028fb30" ARG DOTNET_CHANNEL_A="7.0" ARG DOTNET_CHANNEL_B="6.0" ARG DOTNET_CHANNEL_C="8.0" -ENV PATH="/opt/qodana:${PATH}" -ENV DOTNET_ROOT="/usr/share/dotnet" -ENV QODANA_DOCKER true - -RUN apt-get update && apt-get install -y git default-jre gnupg2 && \ - rm -rf /var/lib/apt/lists/* && mkdir -p /opt/qodana && \ - mkdir -p /data/project && mkdir -p /data/cache && mkdir -p /data/results && \ +# hadolint ignore=SC2174,DL3009 +RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \ + --mount=target=/var/cache/apt,type=cache,sharing=locked \ + rm -f /etc/apt/apt.conf.d/docker-clean && \ + mkdir -m 777 -p /opt/qodana /data/project /data/cache /data/results && apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates=20210119 \ + curl=7.74.0-1.3+deb11u11 \ + default-jre=2:1.11-72 \ + git=1:2.30.2-1+deb11u2 \ + git-lfs=2.13.2-1+b5 \ + gnupg2=2.2.27-2+deb11u2 && \ + apt-get autoremove -y && apt-get clean && \ curl -fsSL -o /tmp/dotnet-install.sh \ "https://raw.githubusercontent.com/dotnet/install-scripts/$DOTNET_INSTALL_SH_REVISION/src/dotnet-install.sh" && \ echo "d9ede6126a6da49cd3509e5fc8236f79addf175696f29d01f38840fd84663514 /tmp/dotnet-install.sh" > /tmp/shasum && \ diff --git a/next/base/dotnet.community.Dockerfile b/next/base/dotnet.community.Dockerfile index 793d6416..847b81a6 100644 --- a/next/base/dotnet.community.Dockerfile +++ b/next/base/dotnet.community.Dockerfile @@ -1,18 +1,31 @@ ARG DOTNET_BASE_TAG="6.0-bullseye-slim" FROM mcr.microsoft.com/dotnet/sdk:$DOTNET_BASE_TAG +ENV QODANA_DATA="/data" \ + QODANA_DOCKER="true" \ + PATH="/opt/qodana:${PATH}" + +ENV DOTNET_ROOT="/usr/share/dotnet" + +# Not using the URL https://dot.net/v1/dotnet-install.sh because of https://github.com/dotnet/install-scripts/issues/276 ARG DOTNET_INSTALL_SH_REVISION="40434288dc5bbda41eafcbcbbc5c0fbbe028fb30" ARG DOTNET_CHANNEL_A="7.0" ARG DOTNET_CHANNEL_B="6.0" ARG DOTNET_CHANNEL_C="8.0" -ENV PATH="/opt/qodana:${PATH}" -ENV DOTNET_ROOT="/usr/share/dotnet" -ENV QODANA_DOCKER true - -RUN apt-get update && apt-get install -y git default-jre && \ - rm -rf /var/lib/apt/lists/* && mkdir -p /opt/qodana && \ - mkdir -p /data/project && mkdir -p /data/cache && mkdir -p /data/results && \ +# hadolint ignore=SC2174,DL3009 +RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \ + --mount=target=/var/cache/apt,type=cache,sharing=locked \ + rm -f /etc/apt/apt.conf.d/docker-clean && \ + mkdir -m 777 -p /opt/qodana /data/project /data/cache /data/results && apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates=20210119 \ + curl=7.74.0-1.3+deb11u11 \ + default-jre=2:1.11-72 \ + git=1:2.30.2-1+deb11u2 \ + git-lfs=2.13.2-1+b5 \ + gnupg2=2.2.27-2+deb11u2 && \ + apt-get autoremove -y && apt-get clean && \ curl -fsSL -o /tmp/dotnet-install.sh \ "https://raw.githubusercontent.com/dotnet/install-scripts/$DOTNET_INSTALL_SH_REVISION/src/dotnet-install.sh" && \ echo "d9ede6126a6da49cd3509e5fc8236f79addf175696f29d01f38840fd84663514 /tmp/dotnet-install.sh" > /tmp/shasum && \