2023-08-24 17:25:54 +00:00
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:6.0-bullseye-slim AS build-env
|
2023-08-23 14:01:09 +00:00
|
|
|
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
|
2023-08-24 17:25:54 +00:00
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim
|
2023-08-23 14:01:09 +00:00
|
|
|
|
|
|
|
WORKDIR /App
|
|
|
|
|
2023-08-24 23:52:15 +00:00
|
|
|
RUN apt update && apt install wget -y && \
|
|
|
|
wget https://files.ivanch.me/api/public/dl/QFCLgtrG/simpleimage.png && \
|
2023-08-24 17:25:54 +00:00
|
|
|
wget https://files.ivanch.me/api/public/dl/E0VLgWbx/bigimage.png && \
|
|
|
|
rm -rf runtimes
|
|
|
|
|
2023-08-23 14:01:09 +00:00
|
|
|
COPY --from=build-env /App/out .
|
|
|
|
|
2023-08-23 14:16:36 +00:00
|
|
|
ENTRYPOINT ["dotnet", "/App/TCC.APP.dll"]
|