File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 1
- # Build the manager binary
2
1
FROM golang:1.20 as builder
3
2
4
3
WORKDIR /workspace
5
- # Copy the Go Modules manifests
6
4
COPY ./ ./
7
5
RUN go mod download
8
6
9
- # Build
10
7
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o migration cmd/cli/main.go
11
8
9
+ RUN chmod +x /workspace/script/wait-for-clickhouse.sh
10
+
12
11
# Use distroless as minimal base image to package the manager binary
13
12
# Refer to https://github.com/GoogleContainerTools/distroless for more details
14
- FROM gcr.io/distroless/static:nonroot
13
+ FROM golang:alpine
15
14
WORKDIR /
16
15
COPY --from=builder /workspace/migration .
17
- COPY /workspace/sql /sql
18
- COPY /workspace/script /script
19
- RUN chmod +x /script/wait-for-clickhouse.sh
16
+ COPY --from=builder /workspace/sql /sql
17
+ COPY --from=builder /workspace/script /script
18
+
20
19
USER 65532:65532
21
20
22
21
ENTRYPOINT ["/migration" ]
You can’t perform that action at this time.
0 commit comments