-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
DockerCompose: support RPCDaemon local-mode #2392
Conversation
… Fix some permissions issues in docker containers.
Amazing - I were need this help. I will test it on mac/win. |
We need try next thing: maybe instead of having host-machine UID - enough just have same UID in 2 containers. |
works on mac! |
I think we can go ahead with this solution:
|
I updated docs: #2394 |
@AskAlexSharov TBH I realized the PID issue by accident because I was running erigon and rpcdaemon in two separate terminals which was fine and then with docker-compose it was giving me the following error when acquiring the lock:
So I figured it has something to do with the PID namespace and so I just gave it a try and it worked 😂 I added another PR #2397 which reduces the PID namespace to only see the You should recreate the containers so that PID mode is changed: I was trying to debug the What's the usual dev build workflow for rebuilding libmdbx for use in erigon locally ? Regarding the host's |
“That repo” is mine. |
You can fork “that repo” |
@AskAlexSharov yeah I thought about forking it but I wanted to have a local possibility to patch it. |
Just edit mdbx.c in your fork. And “go get” new version. You may try: «go mod vendor» in Erigon. It will move all dependencies to vendor folder - and maybe will make them editable. |
command: rpcdaemon --datadir /var/lib/erigon --private.api.addr=erigon:9090 --http.addr=0.0.0.0 --http.vhosts=* --http.corsdomain=* --http.api=eth,debug,net | ||
pid: host | ||
volumes: | ||
- ${XDG_DATA_HOME:-~/.local/share}/erigon:/var/lib/erigon | ||
ports: | ||
- "8545:8545" | ||
restart: unless-stopped |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run lib
I found out it's possible to set the PID namespace so that both
erigon
andrpcdaemon
docker containers share the same namespace. This has the nice side-effect that it's possible to use--datadir
on both containers with a mounted volume because the mdbx lock is not exclusive anymore. This PR is an experimental workaround for runningrpcdaemon
in dockerized Local-Mode.I've tested it on Ubuntu 18.04.5 LTS with a USB stick mounted as a volume and passed via
XDG_DATA_HOME
I've also changed the default user of the containers to either
$UID_GUID
env or1000:1000
as default if it's not set so that permissions are properly handled for the volume.So far it works pretty stable for me 👷