Skip to content

Commit

Permalink
optimize dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
nikmel2803 committed Sep 25, 2023
1 parent 550f72a commit e5dbe1f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ ARG TARGETOS
ARG TARGETARCH

WORKDIR /app/
ADD . .

COPY go.* .
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-w -s" -o flux-webhook-authreconciler ./cmd

FROM --platform=${TARGETPLATFORM:-linux/amd64} scratch
Expand Down

0 comments on commit e5dbe1f

Please sign in to comment.