Skip to content

Commit d293aaa

Browse files
authored
Update Dockerfile
1 parent 8a6a4b5 commit d293aaa

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:7.0 as dotnet-build
1+
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:7.0 as dotnet-build
2+
ARG TARGETPLATFORM
3+
ARG BUILDPLATFORM
24
WORKDIR /src
35
COPY . .
46
RUN dotnet --info
@@ -8,7 +10,9 @@ RUN dotnet build --configuration Release --no-restore
810
#RUN dotnet test --configuration Release CSharpRepl.Tests/CSharpRepl.Tests.csproj --no-build --no-restore
911
RUN dotnet publish --configuration Release CSharpRepl/CSharpRepl.csproj --no-build --no-restore -o /app
1012

11-
FROM mcr.microsoft.com/dotnet/aspnet:7.0
13+
FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/aspnet:7.0
14+
ARG TARGETPLATFORM
15+
ARG BUILDPLATFORM
1216
WORKDIR /app
1317
COPY --from=dotnet-build /app .
1418
ENTRYPOINT ["bash", "start.sh"]

0 commit comments

Comments
 (0)