2021-07-27 02:39:21 +00:00
|
|
|
# syntax=docker/dockerfile:1
|
|
|
|
FROM docker.io/library/golang:1.16-alpine3.13 AS builder
|
2020-10-02 08:16:21 +00:00
|
|
|
|
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
|
2021-07-09 09:40:11 +00:00
|
|
|
ADD . .
|
2021-07-09 08:37:36 +00:00
|
|
|
|
2021-07-24 09:14:46 +00:00
|
|
|
# expect that host run `git submodule update --init`
|
2021-07-09 10:54:27 +00:00
|
|
|
RUN make erigon rpcdaemon integration sentry
|
2017-09-05 09:16:59 +00:00
|
|
|
|
2021-07-09 09:45:18 +00:00
|
|
|
FROM docker.io/library/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
|
|
|
|
2021-07-19 13:40:09 +00:00
|
|
|
RUN adduser -H -u 1000 -g 1000 -D erigon
|
2021-07-24 09:14:46 +00:00
|
|
|
RUN mkdir -p /home/erigon
|
|
|
|
RUN mkdir -p /home/erigon/.local/share/erigon
|
|
|
|
RUN chown -R erigon:erigon /home/erigon
|
|
|
|
|
2021-07-19 13:40:09 +00:00
|
|
|
USER erigon
|
|
|
|
|
2021-07-09 08:37:36 +00:00
|
|
|
EXPOSE 8545 8546 30303 30303/udp 30304 30304/udp 8080 9090 6060
|
2021-07-27 02:39:21 +00:00
|
|
|
|
2021-07-27 02:41:17 +00:00
|
|
|
# https://github.com/opencontainers/image-spec/blob/main/annotations.md
|
2021-07-27 02:39:21 +00:00
|
|
|
ARG BUILD_DATE
|
|
|
|
ARG VCS_REF
|
|
|
|
LABEL org.label-schema.build-date=$BUILD_DATE \
|
|
|
|
org.label-schema.name="Erigon" \
|
|
|
|
org.label-schema.description="Erigon Ethereum Client" \
|
|
|
|
org.label-schema.url="https://torquem.ch" \
|
|
|
|
org.label-schema.vcs-ref=$VCS_REF \
|
|
|
|
org.label-schema.vcs-url="https://github.com/ledgerwatch/erigon.git" \
|
|
|
|
org.label-schema.vendor="Torquem" \
|
|
|
|
org.label-schema.version=$VERSION \
|
|
|
|
org.label-schema.schema-version="1.0"
|