Skip to content

Commit

Permalink
Merge pull request #33 from bmf-san/fix/build-opt
Browse files Browse the repository at this point in the history
Fix build option
  • Loading branch information
bmf-san authored Apr 20, 2023
2 parents 0d45cd7 + 0e486f1 commit d41663f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ FROM golang:1.17.1-alpine as builder

WORKDIR /go/gobel-client-example/app

ARG TARGETPLATFORM
ARG TARGETOS
ARG TARGETARCH

COPY . .

RUN apk update && \
apk upgrade && \
apk add --no-cache libc-dev gcc git openssh openssl bash

ENV CGO_ENABLED=0
ENV GOOS=linux
ENV GOARCH=${TARGETARCH}

RUN go build -o app
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o app

FROM --platform=$BUILDPLATFORM alpine
FROM --platform=$TARGETPLATFORM alpine

COPY --from=builder /go/gobel-client-example/app ./

Expand Down

0 comments on commit d41663f

Please sign in to comment.