Skip to content

Instantly share code, notes, and snippets.

@lbussell
Last active April 23, 2024 18:31
Show Gist options
  • Save lbussell/52e0ac904108d238d0e511f8b6ec89e1 to your computer and use it in GitHub Desktop.
Save lbussell/52e0ac904108d238d0e511f8b6ec89e1 to your computer and use it in GitHub Desktop.
Noble Arm32 cert issue repro
# Installer image
FROM arm32v7/buildpack-deps:jammy-curl AS installer
# Install .NET SDK
RUN curl -fSL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Sdk/8.0.204/dotnet-sdk-8.0.204-linux-arm.tar.gz \
&& mkdir -p /usr/share/dotnet \
&& tar -oxzf dotnet.tar.gz -C /usr/share/dotnet \
&& rm dotnet.tar.gz
# .NET SDK image
FROM ubuntu.azurecr.io/ubuntu:noble
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
\
# .NET dependencies
libc6 \
libgcc-s1 \
libicu74 \
libssl3t64 \
libstdc++6 \
tzdata \
zlib1g \
&& rm -rf /var/lib/apt/lists/*
ENV \
# Do not generate certificate
DOTNET_GENERATE_ASPNET_CERTIFICATE=false \
# Do not show first run text
DOTNET_NOLOGO=true \
# SDK version
DOTNET_SDK_VERSION=8.0.204 \
# Enable correct mode for dotnet watch (only mode supported in a container)
DOTNET_USE_POLLING_FILE_WATCHER=true \
# Skip extraction of XML docs - generally not useful within an image/container - helps performance
NUGET_XMLDOC_MODE=skip \
# Enable detection of running in a container
DOTNET_RUNNING_IN_CONTAINER=true
COPY --from=installer ["/usr/share/dotnet", "/usr/share/dotnet"]
# Trigger first run experience by running arbitrary cmd
RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet && dotnet help
RUN mkdir -p /tmp \
&& cd /tmp \
&& dotnet new console \
&& dotnet add package System.Text.Json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment