GithubHelp home page GithubHelp logo

debu99 / geth-docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from islishude/geth-docker

0.0 0.0 0.0 229 KB

multi-arch and distroless-based docker image for go-ethereum, and out of box support for docker-compose and kubernetes

License: MIT License

Dockerfile 100.00%

geth-docker's Introduction

Geth Docker

  • security by default, No root, No shell
  • minimal and static binary
  • multi-arch

Use the docker image

docker pull ghcr.io/islishude/geth:latest
docker pull ghcr.io/islishude/geth:1.13.12

NOTE: the default user id of the image is 65532

docker-compose

Create the storage directories

$ export GETH_DATADIR=/data/geth
$ sudo mkdir -p $GETH_DATADIR
$ export PRYSM_DATADIR=/data/prysm
$ sudo mkdir -p $PRYSM_DATADIR

Start

$ docker-compose up -d

Kubernetes

Create a storage class like following

# an example for aws and ebs csi
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: my-ebs
parameters:
  csi.storage.k8s.io/fstype: xfs
  encrypted: "false"
  iops: "3000"
  type: gp3
provisioner: ebs.csi.aws.com
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer
allowVolumeExpansion: true

then update pvc.yaml file to change the storage class name to the above.

the statefulsets are using official image(ethereum/client-go).

if you want to use my image, then you need to add securityContext to the statefulset due to the default user is not root.

spec:
  template:
    spec:
      securityContext:
        runAsUser: 65532
        runAsGroup: 65532
        fsGroup: 65532
        fsGroupChangePolicy: OnRootMismatch

Start the statefulset in default namespace, you can add -n parameter to change it.

kubectl apply -n namespace -k k8s

For Development

Command line help page

geth-docker's People

Contributors

islishude avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.