File tree 1 file changed +19
-4
lines changed
1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change 1
1
FROM golang:1.21 as builder
2
- WORKDIR /go/src/app
2
+ WORKDIR /workspace
3
3
COPY go.mod go.sum ./
4
4
RUN go mod download
5
- COPY abi bindings cmd dashboard gethkeystore hdwallet metrics p2p proto rpctypes util ./
6
- RUN CGO_ENABLED=0 make build
5
+
6
+ COPY abi/ abi/
7
+ COPY bindings/ bindings/
8
+ COPY cmd/ cmd/
9
+ COPY dashboard/ dashboard/
10
+ COPY gethkeystore/ gethkeystore/
11
+ COPY hdwallet/ hdwallet/
12
+ COPY metrics/ metrics/
13
+ COPY p2p/ p2p/
14
+ COPY proto/ proto/
15
+ COPY rpctypes/ rpctypes/
16
+ COPY util/ util/
17
+ COPY main.go ./
18
+ RUN CGO_ENABLED=0 go build -o polycli main.go
7
19
8
20
# Use distroless as minimal base image to package the manager binary
9
21
# Refer to https://github.com/GoogleContainerTools/distroless for more details
10
22
FROM gcr.io/distroless/static:nonroot
11
23
WORKDIR /
12
24
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
13
- COPY --from=builder /go/src/app/out /polycli /usr/bin/polycli
25
+ COPY --from=builder /workspace /polycli /usr/bin/polycli
14
26
USER 65532:65532
15
27
ENTRYPOINT ["polycli" ]
16
28
CMD ["--help" ]
29
+
30
+ # How to test this image?
31
+ # https://github.com/maticnetwork/polygon-cli/pull/189#discussion_r1464486344
You can’t perform that action at this time.
0 commit comments