Skip to content

Commit

Permalink
chore: add TARGETARCH
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkato committed Jul 9, 2024
1 parent 157b755 commit e8dd9f6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ FROM --platform=$BUILDPLATFORM golang:1.21-alpine AS build

# Debug shell: $ docker run -it --entrypoint /bin/sh jdkato/vale -s

RUN apk add build-base

COPY . /app/
WORKDIR /app

ENV CGO_ENABLED=1

ARG ltag
ARG TARGETOS TARGETARCH

RUN apk add build-base
RUN CGO_ENABLED=1 GOOS=linux go build -ldflags "-s -w -X main.version=$ltag" -o /app/vale ./cmd/vale
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags "-s -w -X main.version=$ltag" -o /app/vale ./cmd/vale

FROM alpine

Expand Down

0 comments on commit e8dd9f6

Please sign in to comment.