erigon-pulse/Dockerfile
Marius d085bf9a7f
docker-compose with minimal PID namespace and non-root permissions (#2397)
* Feat: only share the erigon container PID namespace with rpcdaemon instead of the entire host PID namespace.

* Feat: remove host UID:GUID mapping from erigon and rpcdaemon containers in favour of erigon user in Dockerfile. Adapted Makefile to pre-create mounted volumes to avoid permission issues at runtime.

* Feat: docker volume directories should always be owned by erigon user(1000:1000) regardless of the user that invoked the make command.

* Fix: don't chown here which breaks docker volume mounts.

* Fix: remove ERIGON_HOME Makefile variable and simplify recipe.
2021-07-19 20:40:09 +07:00

25 lines
611 B
Docker

FROM docker.io/library/golang:1.16-alpine3.13 as builder
RUN apk --no-cache add make gcc g++ linux-headers git bash ca-certificates libgcc libstdc++
WORKDIR /app
ADD . .
RUN make erigon rpcdaemon integration sentry
FROM docker.io/library/alpine:3.13
RUN mkdir -p /var/lib/erigon
VOLUME /var/lib/erigon
RUN apk add --no-cache ca-certificates libgcc libstdc++ tzdata
COPY --from=builder /app/build/bin/* /usr/local/bin/
WORKDIR /var/lib/erigon
RUN adduser -H -u 1000 -g 1000 -D erigon
RUN chown -R erigon:erigon /var/lib/erigon
USER erigon
EXPOSE 8545 8546 30303 30303/udp 30304 30304/udp 8080 9090 6060