Skip to content

Commit 8cfed8b

Browse files
bdovaznefelim4ag
authored andcommitted
Update Dockerfile
1 parent ff17122 commit 8cfed8b

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-preview AS build
1+
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:7.0 AS build
2+
ARG TARGETARCH
23
WORKDIR /app
34

45
RUN mkdir -p src/UnityNuGet && mkdir -p src/UnityNuGet.Server && mkdir -p src/UnityNuGet.Tests
@@ -7,10 +8,10 @@ COPY src/*.sln src
78
COPY src/UnityNuGet/*.csproj src/UnityNuGet
89
COPY src/UnityNuGet.Server/*.csproj src/UnityNuGet.Server
910
COPY src/UnityNuGet.Tests/*.csproj src/UnityNuGet.Tests
10-
RUN dotnet restore src
11+
RUN dotnet restore src -a $TARGETARCH
1112

1213
COPY . ./
13-
RUN dotnet publish src -c Release -o /app/src/out
14+
RUN dotnet publish src -a $TARGETARCH -c Release -o /app/src/out
1415

1516
# Build runtime image
1617
FROM mcr.microsoft.com/dotnet/aspnet:7.0

0 commit comments

Comments
 (0)