Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,14 @@ jobs:
uses: docker/setup-buildx-action@v2

- name: Build and push
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: .
file: src/Teapot.Web/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# platforms: linux/amd64,linux/arm64
platforms: linux/amd64
platforms: linux/amd64,linux/arm64

deploy-azure:
runs-on: ubuntu-latest
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,14 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Build and push
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
file: src/Teapot.Web/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# platforms: linux/amd64,linux/arm64
platforms: linux/amd64
platforms: linux/amd64,linux/arm64

deploy-azure:
runs-on: ubuntu-latest
Expand Down
9 changes: 5 additions & 4 deletions src/Teapot.Web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS base
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing --platform=$BUILDPLATFORM have made it work for arm64 images. Please see the suggestion here dotnet/dotnet-docker#5041 . I also tried it out by forking your repo and tested it here https://github.com/sarathkrishnamurthy/httpstatus/pull/1/files#diff-bad1646173d8a455b51286df9ee5a0b27991e22036399c8fa71f7d1c9fa4130cR3

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @aaronpowell , do we have any update on this?

WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY ["src/Teapot.Web/Teapot.Web.csproj", "Teapot.Web/"]
COPY [".git", ".git"]
Expand All @@ -15,9 +15,10 @@ WORKDIR "/src/Teapot.Web"
RUN dotnet build "Teapot.Web.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "Teapot.Web.csproj" -c Release -o /app/publish
ARG TARGETARCH
RUN dotnet publish "Teapot.Web.csproj" -c Release -o /app/publish -a $TARGETARCH

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Teapot.Web.dll"]
ENTRYPOINT ["dotnet", "Teapot.Web.dll"]