Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vijeyash1 committed Sep 15, 2023
1 parent 9ddb0ed commit 10e434f
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions dockerfiles/migration/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,26 @@ RUN chmod +x /script/wait-for-clickhouse.sh
USER 65532:65532

ENTRYPOINT ["/migration"]


FROM golang:1.20 as builder

WORKDIR /workspace
COPY ./ ./
RUN go mod download

RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o migration cmd/cli/main.go

RUN chmod +x /workspace/script/wait-for-clickhouse.sh

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot
WORKDIR /
COPY --from=builder /workspace/migration .
COPY --from=builder /workspace/sql /sql
COPY --from=builder /workspace/script /script

USER 65532:65532

ENTRYPOINT ["/migration"]

0 comments on commit 10e434f

Please sign in to comment.