Simple to set up Ethereum node with Geth client.
docker run --detach --name geth --publish 8545:8545/tcp --publish 8546:8546/tcp --publish 30303:30303/tcp --publish 30303:30303/udp hetsh/gethdocker stop gethGeth can be configured via cli-options that can be appended at the end of a docker run:
docker run ... hetsh/geth --syncmode "light"A config file can be specified the same way:
docker run ... hetsh/geth --config "path/to/config"STORAGE="/path/to/storage"
mkdir -p "$STORAGE"
chown -R 1373:1373 "$STORAGE"1373 is the numerical id of the user running the server (see Dockerfile).
The user must have RW access to the storage directory.
Start the server with the additional mount flags:
docker run --mount type=bind,source=/path/to/storage,target=/geth-data ...Synchronizing the timezones will display the correct time in the logs. The timezone can be shared with this mount flag:
docker run --mount type=bind,source=/etc/localtime,target=/etc/localtime,readonly ...The systemd unit can be found in my GitHub repository.
systemctl enable geth --nowBy default, the systemd service assumes /apps/geth for storage and /etc/localtime for timezone.
Since this is a personal systemd unit file, you might need to adjust some parameters to suit your setup.
This is an open project hosted on GitHub. Please feel free to ask questions, file an issue or contribute to it.