2021-03-19 09:32:52 +00:00
|
|
|
FROM golang:1.16-alpine3.13 as builder
|
2020-10-02 08:16:21 +00:00
|
|
|
|
2020-10-30 08:43:24 +00:00
|
|
|
ARG git_commit
|
|
|
|
ENV GIT_COMMIT=$git_commit
|
|
|
|
|
2021-03-01 04:02:06 +00:00
|
|
|
ARG git_branch
|
|
|
|
ENV GIT_BRANCH=$git_branch
|
|
|
|
|
2021-06-06 08:05:30 +00:00
|
|
|
ARG git_tag
|
|
|
|
ENV GIT_TAG=$git_tag
|
|
|
|
|
2020-10-30 08:43:24 +00:00
|
|
|
# for linters to avoid warnings. we won't use linters in Docker anyway
|
|
|
|
ENV LATEST_COMMIT="undefined"
|
|
|
|
|
2020-10-28 03:18:10 +00:00
|
|
|
RUN apk --no-cache add make gcc g++ linux-headers git bash ca-certificates libgcc libstdc++
|
2016-11-15 17:57:56 +00:00
|
|
|
|
2020-08-21 12:38:11 +00:00
|
|
|
WORKDIR /app
|
|
|
|
|
2020-04-11 07:22:23 +00:00
|
|
|
# next 2 lines helping utilize docker cache
|
2020-08-21 12:38:11 +00:00
|
|
|
COPY go.mod go.sum ./
|
|
|
|
RUN go mod download
|
2020-04-11 07:22:23 +00:00
|
|
|
|
2020-08-21 12:38:11 +00:00
|
|
|
ADD . .
|
2020-08-27 06:45:24 +00:00
|
|
|
RUN make all
|
2017-09-05 09:16:59 +00:00
|
|
|
|
2021-03-19 09:32:52 +00:00
|
|
|
FROM alpine:3.13
|
2016-11-15 17:57:56 +00:00
|
|
|
|
2021-05-06 17:22:11 +00:00
|
|
|
RUN apk add --no-cache ca-certificates libgcc libstdc++ tzdata
|
2020-08-01 07:39:04 +00:00
|
|
|
COPY --from=builder /app/build/bin/* /usr/local/bin/
|
2016-11-15 17:57:56 +00:00
|
|
|
|
2020-09-13 20:25:15 +00:00
|
|
|
EXPOSE 8545 8546 30303 30303/udp 8080 9090 6060
|