mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 03:30:37 +00:00
makefile: Add DOCKER_{UID,GID,TAG} make params (#4457)
Co-authored-by: 3np <3np@example.com>
This commit is contained in:
parent
2e600316e3
commit
a738a0dd51
@ -16,7 +16,9 @@ FROM docker.io/library/alpine:3.15
|
||||
RUN apk add --no-cache ca-certificates libstdc++ tzdata
|
||||
COPY --from=builder /app/build/bin/* /usr/local/bin/
|
||||
|
||||
RUN adduser -H -u 1000 -g 1000 -D erigon
|
||||
ARG PUID=1000
|
||||
ARG PGID=1000
|
||||
RUN adduser -H -u ${PUID} -g ${PGID} -D erigon
|
||||
RUN mkdir -p /home/erigon
|
||||
RUN mkdir -p /home/erigon/.local/share/erigon
|
||||
RUN chown -R erigon:erigon /home/erigon
|
||||
|
7
Makefile
7
Makefile
@ -4,6 +4,9 @@ GOBIN = $(CURDIR)/build/bin
|
||||
GIT_COMMIT ?= $(shell git rev-list -1 HEAD)
|
||||
GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
|
||||
GIT_TAG ?= $(shell git describe --tags '--match=v*' --dirty)
|
||||
DOCKER_UID ?= 1000
|
||||
DOCKER_PID ?= 1000
|
||||
DOCKER_TAG ?= thorax/erigon:latest
|
||||
|
||||
CGO_CFLAGS := $(shell $(GO) env CGO_CFLAGS) # don't loose default
|
||||
CGO_CFLAGS += -DMDBX_FORCE_ASSERTIONS=1 # Enable MDBX's asserts by default in 'devel' branch and disable in 'stable'
|
||||
@ -30,10 +33,12 @@ go-version:
|
||||
fi
|
||||
|
||||
docker: git-submodules
|
||||
DOCKER_BUILDKIT=1 docker build -t thorax/erigon:latest \
|
||||
DOCKER_BUILDKIT=1 docker build -t ${DOCKER_TAG} \
|
||||
--build-arg "BUILD_DATE=$(shell date -Iseconds)" \
|
||||
--build-arg VCS_REF=${GIT_COMMIT} \
|
||||
--build-arg VERSION=${GIT_TAG} \
|
||||
--build-arg PUID=${DOCKER_UID} \
|
||||
--build-arg PGID=${DOCKER_PID} \
|
||||
${DOCKER_FLAGS} \
|
||||
.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user