Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
- name: Build and push Docker image (multi-arch)
uses: docker/build-push-action@v3
with:
file: Dockerfile
Expand Down
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM golang:1.24-alpine AS builder
FROM --platform=$BUILDPLATFORM golang:1.24-alpine AS builder

ARG TARGETOS
ARG TARGETARCH
WORKDIR /app

# Install git for Go modules
Expand All @@ -12,8 +14,8 @@ RUN go mod download
# Copy the entire codebase
COPY . .

# Build the binary
RUN go build -o validator-tracker ./cmd/main.go
# Build a static binary for the target platform
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -o validator-tracker ./cmd/main.go

# Final image
FROM alpine:3.21
Expand Down