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 .dockerignore
docker-build.sh docker-build.sh
.vs/ .vs/
.idea/

View File

@ -2,11 +2,11 @@ FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-preview AS build
ARG TARGETARCH ARG TARGETARCH
WORKDIR /build WORKDIR /build
COPY Pal.Common/Pal.Common.csproj Pal.Common/ COPY Pal.Common/Pal.Common.csproj Pal.Common/
COPY Pal.Server/Pal.Server.csproj Pal.Server/ COPY Server/Server/Pal.Server.csproj Pal.Server/
RUN dotnet restore Pal.Server/Pal.Server.csproj -a $TARGETARCH RUN dotnet restore Server/Server/Pal.Server.csproj -a $TARGETARCH
COPY . ./ 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 FROM mcr.microsoft.com/dotnet/aspnet:8.0-preview

View File

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