Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(build): use build-platform instead of emulation #221

Merged
merged 1 commit into from
Apr 24, 2024
Merged
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
9 changes: 8 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
# Ignore build and test binaries.
bin/
testbin/
config/
docs/
scripts/
logo/
*Dockerfile
Dockerfile*
test/
*.md
7 changes: 1 addition & 6 deletions .github/workflows/__build-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,6 @@ jobs:
username: ${{ inputs.username }}
password: ${{ secrets.dockerhub-token }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: ${{ matrix.arch }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

Expand Down Expand Up @@ -197,7 +192,7 @@ jobs:
type=semver,pattern={{major}}
type=sha
${{ env.TAGS_STANDARD }}${{ env.TAGS_SUPPLEMENTAL }}
flavor: latest=${{ inputs.latest }},suffix=-${{ matrix.arch }}
flavor: latest=${{ inputs.latest }},suffix=-${{ matrix.arch }}

- uses: docker/setup-buildx-action@v3

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Builder
# ------------------------------------------------------------------------------

FROM golang:1.22.2 as builder
FROM --platform=$BUILDPLATFORM golang:1.22.2 as builder

WORKDIR /workspace
ARG GOPATH
Expand Down
2 changes: 1 addition & 1 deletion debug.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Debug image
# ------------------------------------------------------------------------------

FROM golang:1.22.2 as debug
FROM --platform=$BUILDPLATFORM golang:1.22.2 as debug

ARG GOPATH
ARG GOCACHE
Expand Down
Loading