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
|
2023-09-11 02:14:21 +00:00
|
|
|
RUN apt update && apt install wget -y
|
2023-08-23 14:01:09 +00:00
|
|
|
COPY * .
|
|
|
|
|
|
|
|
# Restore as distinct layers
|
|
|
|
RUN dotnet restore
|
|
|
|
|
|
|
|
# Build a release
|
|
|
|
RUN dotnet build -c Release -o out
|
|
|
|
|
2023-09-11 02:14:21 +00:00
|
|
|
RUN cd out && \
|
2024-01-16 00:03:44 +00:00
|
|
|
wget https://files.ivanch.me/api/public/dl/ch3NV0P8/small-image.png && \
|
|
|
|
wget https://files.ivanch.me/api/public/dl/jNlXYMLR/big-image.png && \
|
|
|
|
wget https://files.ivanch.me/api/public/dl/QdKvaeQI/video.mp4 && \
|
|
|
|
wget https://files.ivanch.me/api/public/dl/YD4vmSsO/nginx.html && \
|
2023-09-11 02:14:21 +00:00
|
|
|
rm -rf runtimes && \
|
|
|
|
mkdir -p ./static && \
|
|
|
|
mv small-image.png ./static && \
|
|
|
|
mv big-image.png ./static && \
|
2023-10-27 01:33:28 +00:00
|
|
|
mv video.mp4 ./static && \
|
|
|
|
mv nginx.html ./static
|
2023-09-11 02:14:21 +00:00
|
|
|
|
2023-08-23 14:01:09 +00:00
|
|
|
# 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
|
|
|
|
|
|
|
|
COPY --from=build-env /App/out .
|
|
|
|
|
2023-08-23 14:16:36 +00:00
|
|
|
ENTRYPOINT ["dotnet", "/App/TCC.APP.dll"]
|