Skip to content

Commit

Permalink
build: use cross-compilation build instead of emulated build for fast…
Browse files Browse the repository at this point in the history
  • Loading branch information
joshiste committed Oct 20, 2023
1 parent 2711e55 commit bcd0827
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,21 @@
##
## Build
##
FROM goreleaser/goreleaser:v1.19.2 AS build
FROM --platform=$BUILDPLATFORM goreleaser/goreleaser:v1.19.2 AS build

ARG TARGETOS TARGETARCH
ARG BUILD_WITH_COVERAGE
ARG BUILD_SNAPSHOT=true

WORKDIR /app

COPY . .

RUN goreleaser build --snapshot="${BUILD_SNAPSHOT}" --single-target -o extension
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH goreleaser build --snapshot="${BUILD_SNAPSHOT}" --single-target -o extension
##
## Runtime
##
FROM alpine:3.17
FROM alpine:3.18

LABEL "steadybit.com.discovery-disabled"="true"

Expand Down

0 comments on commit bcd0827

Please sign in to comment.