Skip to content

Commit

Permalink
Try fixing github docker build error on arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
fxsth committed Jan 10, 2024
1 parent 7d77ebf commit a8677f9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG TARGETARCH
WORKDIR /app

# Install Node.js
Expand All @@ -13,11 +14,11 @@ RUN apt-get update \

WORKDIR /src
COPY ["Web/Web.csproj", "Web/"]
RUN dotnet restore "Web/Web.csproj" --use-current-runtime
RUN dotnet restore "Web/Web.csproj" -a $TARGETARCH
WORKDIR "/src/Web"
COPY ./Web .

RUN dotnet publish "Web.csproj" --use-current-runtime --self-contained false -c Release -o /app/publish
RUN dotnet publish "Web.csproj" -a $TARGETARCH --self-contained false -c Release -o /app/publish

FROM mcr.microsoft.com/dotnet/aspnet:8.0

Expand Down

0 comments on commit a8677f9

Please sign in to comment.