Add project files.
This commit is contained in:
commit
86a57f81f8
52 changed files with 4823 additions and 0 deletions
22
Dockerfile
Normal file
22
Dockerfile
Normal 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"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue