Skip to content

Commit f741b0e

Browse files
committed
fix: issue with copying parts of the source code
1 parent 77736bb commit f741b0e

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

Dockerfile

+19-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,31 @@
11
FROM golang:1.21 as builder
2-
WORKDIR /go/src/app
2+
WORKDIR /workspace
33
COPY go.mod go.sum ./
44
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
719

820
# Use distroless as minimal base image to package the manager binary
921
# Refer to https://github.com/GoogleContainerTools/distroless for more details
1022
FROM gcr.io/distroless/static:nonroot
1123
WORKDIR /
1224
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
1426
USER 65532:65532
1527
ENTRYPOINT ["polycli"]
1628
CMD ["--help"]
29+
30+
# How to test this image?
31+
# https://github.com/maticnetwork/polygon-cli/pull/189#discussion_r1464486344

0 commit comments

Comments
 (0)