mirror of https://github.com/ivanch/tcc.git
docer
This commit is contained in:
parent
659acde4ad
commit
150ec0e1d7
|
@ -2,6 +2,7 @@ FROM mcr.microsoft.com/dotnet/sdk:6.0-bullseye-slim AS build-env
|
||||||
WORKDIR /App
|
WORKDIR /App
|
||||||
|
|
||||||
# Copy everything
|
# Copy everything
|
||||||
|
RUN apt update && apt install wget -y
|
||||||
COPY * .
|
COPY * .
|
||||||
|
|
||||||
# Restore as distinct layers
|
# Restore as distinct layers
|
||||||
|
@ -10,6 +11,16 @@ RUN dotnet restore
|
||||||
# Build a release
|
# Build a release
|
||||||
RUN dotnet build -c Release -o out
|
RUN dotnet build -c Release -o out
|
||||||
|
|
||||||
|
RUN cd out && \
|
||||||
|
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 && \
|
||||||
|
mkdir -p ./static && \
|
||||||
|
cp simpleimage.png ./static && \
|
||||||
|
cp bigimage.png ./static && \
|
||||||
|
mv video.mp4 ./static
|
||||||
|
|
||||||
# Build runtime image
|
# Build runtime image
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim
|
FROM mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim
|
||||||
|
|
||||||
|
@ -17,13 +28,4 @@ WORKDIR /App
|
||||||
|
|
||||||
COPY --from=build-env /App/out .
|
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"]
|
ENTRYPOINT ["dotnet", "/App/TCC.APP.dll"]
|
Loading…
Reference in New Issue