Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backward compatibility: use default UID=1000 GID=1000 #4702

Merged
merged 2 commits into from
Jul 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
ERIGON_USER=erigon

# UID, GID of user inside docker process which must exist also on host OS
DOCKER_UID=3473 # random number [1001, 10000] chosen arbitrarily for example
DOCKER_GID=3473 # can choose any valid #. 1000 tends to be taken by first user
DOCKER_UID=1000 # random number [1001, 10000] chosen arbitrarily for example
DOCKER_GID=1000 # can choose any valid #. 1000 tends to be taken by first user
12 changes: 6 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ services:
erigon:
image: thorax/erigon:${TAG:-latest}
build:
args:
UID: ${DOCKER_UID}
GID: ${DOCKER_GID}
context: .
user: "${DOCKER_UID}:${DOCKER_GID}"
args:
UID: ${DOCKER_UID:1000}
GID: ${DOCKER_GID:1000}
context: .
user: "${DOCKER_UID:1000}:${DOCKER_GID:1000}"
command: |
erigon ${ERIGON_FLAGS-} --private.api.addr=0.0.0.0:9090
--sentry.api.addr=sentry:9091 --downloader.api.addr=downloader:9093 --txpool.disable
Expand Down Expand Up @@ -67,7 +67,7 @@ services:

prometheus:
image: prom/prometheus:v2.36.2
user: ${DOCKER_UID}:${DOCKER_GID} # Uses erigon user from Dockerfile
user: ${DOCKER_UID:1000}:${DOCKER_GID:1000} # Uses erigon user from Dockerfile
command: --log.level=warn --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/prometheus --storage.tsdb.retention.time=150d --web.console.libraries=/usr/share/prometheus/console_libraries --web.console.templates=/usr/share/prometheus/consoles
ports: [ "9090:9090" ]
volumes:
Expand Down