Add project files.

This commit is contained in:
Tea 2024-03-05 11:44:30 +01:00
commit 86a57f81f8
52 changed files with 4823 additions and 0 deletions

22
Dockerfile Normal file
View file

@ -0,0 +1,22 @@
# Learn about building .NET container images:
# https://github.com/dotnet/dotnet-docker/blob/main/samples/README.md
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG TARGETARCH
WORKDIR /source
# copy csproj and restore as distinct layers
COPY PizzaBot/*.csproj .
RUN dotnet restore -a $TARGETARCH
# copy and publish app and libraries
COPY PizzaBot/. .
RUN dotnet publish -a $TARGETARCH --no-restore -o /app
# final stage/image
FROM mcr.microsoft.com/dotnet/aspnet:8.0
EXPOSE 8080
WORKDIR /app
COPY --from=build /app .
USER $APP_UID
ENTRYPOINT ["./PizzaBot"]