erigon-pulse/Dockerfile
Chase Wright d8888439b7
Add tzdata to alpine container for log timestamps (#1892)
Alpine containers, by default, do not include `tzdata` package, so they do not honor the `TZ` environment variable. When running in a docker container the logs timestamps will always be in UTC without this package. I propose we add `tzdata` so that the timezone can be changed.
2021-05-06 18:22:11 +01:00

29 lines
627 B
Docker

FROM golang:1.16-alpine3.13 as builder
ARG git_commit
ENV GIT_COMMIT=$git_commit
ARG git_branch
ENV GIT_BRANCH=$git_branch
# for linters to avoid warnings. we won't use linters in Docker anyway
ENV LATEST_COMMIT="undefined"
RUN apk --no-cache add make gcc g++ linux-headers git bash ca-certificates libgcc libstdc++
WORKDIR /app
# next 2 lines helping utilize docker cache
COPY go.mod go.sum ./
RUN go mod download
ADD . .
RUN make all
FROM alpine:3.13
RUN apk add --no-cache ca-certificates libgcc libstdc++ tzdata
COPY --from=builder /app/build/bin/* /usr/local/bin/
EXPOSE 8545 8546 30303 30303/udp 8080 9090 6060