tcc/ASP.NET/Dockerfile

29 lines
765 B
Docker

FROM mcr.microsoft.com/dotnet/sdk:6.0-bullseye-slim AS build-env
WORKDIR /App
# Copy everything
COPY * .
# Restore as distinct layers
RUN dotnet restore
# Build a release
RUN dotnet build -c Release -o out
# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim
WORKDIR /App
COPY --from=build-env /App/out .
RUN apt update && apt install wget -y && \
wget https://files.ivanch.me/api/public/dl/QFCLgtrG/simpleimage.png && \
wget https://files.ivanch.me/api/public/dl/E0VLgWbx/bigimage.png && \
wget https://files.ivanch.me/api/public/dl/nTAYqZwD/video.mp4 && \
rm -rf runtimes && \
cp simpleimage.png ./static && \
cp bigimage.png ./static && \
mv video.mp4 ./static
ENTRYPOINT ["dotnet", "/App/TCC.APP.dll"]