51 lines
2.0 KiB
Plaintext
51 lines
2.0 KiB
Plaintext
FROM mcr.microsoft.com/dotnet/sdk as build-env
|
|
|
|
ENV \
|
|
# Unset ASPNETCORE_URLS from aspnet base image
|
|
ASPNETCORE_URLS= \
|
|
# Do not generate certificate
|
|
DOTNET_GENERATE_ASPNET_CERTIFICATE=false \
|
|
# Do not show first run text
|
|
DOTNET_NOLOGO=true \
|
|
# SDK version
|
|
DOTNET_SDK_VERSION=6.0.300 \
|
|
# 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 \
|
|
# PowerShell telemetry for docker image usage
|
|
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-DotnetSDK-Ubuntu-22.04
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends \
|
|
curl \
|
|
git \
|
|
wget \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install .NET SDK
|
|
RUN curl -fSL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-sdk-$DOTNET_SDK_VERSION-linux-x64.tar.gz \
|
|
&& dotnet_sha512='52d720e90cfb889a92d605d64e6d0e90b96209e1bd7eab00dab1d567017d7a5a4ff4adbc55aff4cffcea4b1bf92bb8d351859d00d8eb65059eec5e449886c938' \
|
|
&& echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \
|
|
&& mkdir -p /usr/share/dotnet \
|
|
&& tar -oxzf dotnet.tar.gz -C /usr/share/dotnet ./packs ./sdk ./sdk-manifests ./templates ./LICENSE.txt ./ThirdPartyNotices.txt \
|
|
&& rm dotnet.tar.gz \
|
|
# Trigger first run experience by running arbitrary cmd
|
|
&& dotnet help
|
|
|
|
COPY . ./
|
|
RUN dotnet restore
|
|
RUN dotnet publish -c Release -o out
|
|
|
|
FROM mcr.microsoft.com/dotnet/sdk
|
|
WORKDIR /pandocdemo
|
|
COPY --from=build-env out .
|
|
|
|
COPY docs /docs
|
|
|
|
RUN apt-get update && apt-get install --assume-yes --no-install-recommends -y pandoc
|
|
RUN apt-get update && apt-get install --assume-yes --no-install-recommends -y texlive-latex-base texlive-xetex lmodern
|
|
RUN apt-get update && apt-get install --assume-yes --no-install-recommends -y texlive-fonts-recommended
|
|
|
|
ENTRYPOINT ["dotnet", "pandocDemo.dll"]
|