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

Docker refactoring #22861

Closed
wants to merge 4 commits into from
Closed

Conversation

mFarghaly
Copy link

PR Summary

  • Setting up non-root ethereum user:group for the docker container and following best security practices
  • Creating /home/ethereum home directory for the docker image instead of /root
  • Updating go.mod version to 1.16
  • Updating docker builder image to alpine 1.16.4
  • Changing all occcuraences of /root directory in the documentation to /home/ethereum

After building and running the docker image

$ docker exec <container-id> id
uid=1000(ethereum) gid=1000(ethereum) # was uid=1(root) gid=1(root)

$ docker exec <container-id> whomi
ethereum # was root

$ docker exec <container-id> which geth
/home/ethereum/bin/geth # was /usr/bin/geth

@mFarghaly mFarghaly requested a review from karalabe as a code owner May 11, 2021 17:56
@karalabe
Copy link
Member

Thanks for this PR, but it's unfortunately a no go. Many people use our docker images either as standalone Geth instances or building further layers on top. The behavior at this point is considered API and we can't afford to change things. Changing permissions would most probably result in broken deploys or permission denied errors for existing users. Changing locations would result in broken higher level images or automations/mounts built on top.

Btw, the 1.16 docker images defaults to the latest minor release in the 1.16 family, so currently 1.16.4, no need to be explicit (actually, better the current way because we don't need to follow minor Go releases).

Go mod was deliberately not updated to 1.16, there were previous PRs. We don't see a reason to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants