Skip to content

Commit

Permalink
Merge pull request #230 from intelops/clickhousemigration
Browse files Browse the repository at this point in the history
minor fix
  • Loading branch information
vijeyash1 authored Sep 15, 2023
2 parents 245e11b + 10e434f commit 890fa9a
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 890fa9a

Please sign in to comment.