Skip to content

Commit

Permalink
Fix mac arm64 build (#108)
Browse files Browse the repository at this point in the history
* Add build-args input

* Updated Dockerfile for broker service

Removed TARGETOS argument and its usage from the Dockerfile. This simplifies the build process by not specifying the operating system during dotnet publish command execution.
  • Loading branch information
UnstoppableMango authored Jun 4, 2024
1 parent 9b59144 commit b786ca8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/actions/build-docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ inputs:
push:
description: Push the resulting image.
default: 'false'
build-args:
description: Optional build arguments to provide.
token:
description: The GITHUB_TOKEN to use for pushing to ghcr.io.
required: true
Expand Down Expand Up @@ -51,6 +53,7 @@ runs:
- uses: docker/build-push-action@v5
with:
file: ${{ inputs.file }}
build-args: ${{ inputs.build-args }}
provenance: true
sbom: true
platforms: linux/amd64,linux/arm64
Expand Down
2 changes: 0 additions & 2 deletions docker/broker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0.100-preview.4 AS base
ARG BUILDPLATFORM
ARG TARGETARCH
ARG TARGETOS

FROM --platform=$BUILDPLATFORM base AS build
WORKDIR /build
Expand All @@ -23,7 +22,6 @@ COPY src/Broker/ ./Broker/
RUN MINVERDISABLE=true \
dotnet publish \
--no-restore \
--os $TARGETOS \
--arch $TARGETARCH \
--configuration Release \
--output /out \
Expand Down

0 comments on commit b786ca8

Please sign in to comment.