Update docker build

This commit is contained in:
Liza 2023-11-11 01:54:43 +01:00
parent 8def5e28a4
commit ce9be45e8f
Signed by: liza
GPG Key ID: 7199F8D727D55F67
3 changed files with 6 additions and 4 deletions

View File

@ -6,3 +6,4 @@ Dockerfile
.dockerignore
docker-build.sh
.vs/
.idea/

View File

@ -2,11 +2,11 @@ FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-preview AS build
ARG TARGETARCH
WORKDIR /build
COPY Pal.Common/Pal.Common.csproj Pal.Common/
COPY Pal.Server/Pal.Server.csproj Pal.Server/
RUN dotnet restore Pal.Server/Pal.Server.csproj -a $TARGETARCH
COPY Server/Server/Pal.Server.csproj Pal.Server/
RUN dotnet restore Server/Server/Pal.Server.csproj -a $TARGETARCH
COPY . ./
RUN dotnet publish Pal.Server/Pal.Server.csproj -a $TARGETARCH --no-restore -o /dist
RUN dotnet publish Server/Server/Pal.Server.csproj -a $TARGETARCH --no-restore -o /dist
FROM mcr.microsoft.com/dotnet/aspnet:8.0-preview
@ -27,4 +27,4 @@ WORKDIR /app
COPY --from=build-env /dist .
USER pal
ENTRYPOINT ["dotnet", "Pal.Server.dll"]
ENTRYPOINT ["dotnet", "Pal.Server.dll"]

View File

@ -1,3 +1,4 @@
git fetch origin master
git reset --hard origin/master
git submodule update --checkout
docker buildx build -t palacepal-server --platform linux/amd64,linux/arm64 .