Skip to content

Commit

Permalink
Merge pull request #232 from dvdksn/docker-multiplatform
Browse files Browse the repository at this point in the history
release: multi-platform docker image
  • Loading branch information
wjdp authored Feb 16, 2024
2 parents 19cc89c + 909c477 commit b61b82d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ jobs:
with:
push: true
tags: ${{ env.DOCKER_REPO }}:${{ env.GIT_VERSION }}
platforms: linux/amd64,linux/arm64
cache-from: ${{ env.DOCKER_REPO }}:latest
build-args: |
VERSION=${{ env.GIT_VERSION }}
Expand Down
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
ARG GO_VERSION=1.21.4
ARG TARGET=alpine:3.9

FROM golang:${GO_VERSION}-alpine AS builder
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS builder
ARG TARGETARCH
ARG TARGETOS
ENV GOOS=$TARGETOS
ENV GOARCH=$TARGETARCH

RUN apk add --no-cache ca-certificates git

Expand Down

0 comments on commit b61b82d

Please sign in to comment.