2020-08-20 16:41:37 +03:00
|
|
|
FROM golang:1.15-alpine as builder
|
2017-09-05 12:16:59 +03:00
|
|
|
|
2019-05-08 08:44:28 -05:00
|
|
|
RUN apk add --no-cache make gcc musl-dev linux-headers git
|
2016-11-15 17:57:56 +00:00
|
|
|
|
2020-08-21 14:38:11 +02:00
|
|
|
WORKDIR /app
|
|
|
|
|
2020-04-11 14:22:23 +07:00
|
|
|
# next 2 lines helping utilize docker cache
|
2020-08-21 14:38:11 +02:00
|
|
|
COPY go.mod go.sum ./
|
|
|
|
RUN go mod download
|
2020-04-11 14:22:23 +07:00
|
|
|
|
2020-08-21 14:38:11 +02:00
|
|
|
ADD . .
|
2020-08-27 13:45:24 +07:00
|
|
|
RUN make all
|
2017-09-05 12:16:59 +03:00
|
|
|
|
2020-08-01 14:39:04 +07:00
|
|
|
FROM alpine:3
|
2016-11-15 17:57:56 +00:00
|
|
|
|
2017-09-05 16:06:04 +03:00
|
|
|
RUN apk add --no-cache ca-certificates
|
2020-08-01 14:39:04 +07:00
|
|
|
COPY --from=builder /app/build/bin/* /usr/local/bin/
|
2016-11-15 17:57:56 +00:00
|
|
|
|
2020-08-27 13:45:24 +07:00
|
|
|
EXPOSE 8545 8546 8547 30303 30303/udp 8080 9090 6060
|