mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 10:52:43 +00:00
Update docs for testnet3 (#773)
* Start docker docs * Add progress * Update docker.md * Add note about geth syncing * Fix env to use geth * Update docs * Remove sigp goerli node * Change text about eth1 syncing * Address comments from @pscott * Add links to beaconcha.in * Add instructions for starting an eth1 node * Fix typo * Re-organise Syncing log
This commit is contained in:
@@ -3,17 +3,83 @@
|
||||
This repository has a `Dockerfile` in the root which builds an image with the
|
||||
`lighthouse` binary installed.
|
||||
|
||||
To use the image, first build it (this will likely take several minutes):
|
||||
A pre-built image is available on Docker Hub and the
|
||||
[sigp/lighthouse](https://github.com/sigp/lighthouse-docker) repository
|
||||
contains a full-featured `docker-compose` environment.
|
||||
|
||||
## Obtaining the Docker image
|
||||
|
||||
There are two ways to obtain the docker image, either via Docker Hub or
|
||||
building the image from source. Once you have obtained the docker image via one
|
||||
of these methods, proceed to [Using the Docker image](#using-the-docker-image).
|
||||
|
||||
### Docker Hub
|
||||
|
||||
Lighthouse maintains the
|
||||
[sigp/lighthouse](https://hub.docker.com/repository/docker/sigp/lighthouse/)
|
||||
Docker Hub repository which provides an easy way to run Lighthouse without
|
||||
building the image yourself.
|
||||
|
||||
Download and test the image with:
|
||||
|
||||
```bash
|
||||
$ docker build . -t lighthouse
|
||||
$ docker run sigp/lighthouse lighthouse --help
|
||||
```
|
||||
|
||||
Once it's built, run it with:
|
||||
> Note: when you're running the Docker Hub image you're relying upon a
|
||||
> pre-built binary instead of building from source.
|
||||
|
||||
### Building the Docker Image
|
||||
|
||||
To build the image from source, navigate to
|
||||
the root of the repository and run:
|
||||
|
||||
```bash
|
||||
$ docker run lighthouse lighthouse --help
|
||||
$ docker build . -t lighthouse:local
|
||||
```
|
||||
|
||||
_Note: the first `lighthouse` is the name of the tag we created earlier. The
|
||||
second `lighthouse` refers to the binary installed in the image._
|
||||
The build will likely take several minutes. Once it's built, test it with:
|
||||
|
||||
```bash
|
||||
$ docker run lighthouse:local lighthouse --help
|
||||
```
|
||||
|
||||
## Using the Docker image
|
||||
|
||||
You can run a Docker beacon node with the following command:
|
||||
|
||||
```bash
|
||||
$ docker run -p 9000:9000 -p 5052:5052 -v $HOME/.lighthouse:/root/.lighthouse sigp/lighthouse lighthouse beacon --http
|
||||
```
|
||||
|
||||
> The `-p` and `-v` and values are described below.
|
||||
|
||||
### Volumes
|
||||
|
||||
Lighthouse uses the `/root/.lighthouse` directory inside the Docker image to
|
||||
store the configuration, database and validator keys. Users will generally want
|
||||
to create a bind-mount volume to ensure this directory persists between `docker
|
||||
run` commands.
|
||||
|
||||
The following example runs a beacon node with the data directory
|
||||
mapped to the users home directory:
|
||||
|
||||
```bash
|
||||
$ docker run -v $HOME/.lighthouse:/root/.lighthouse sigp/lighthouse lighthouse beacon
|
||||
```
|
||||
|
||||
### Ports
|
||||
|
||||
In order to be a good peer and serve other peers you should expose port `9000`.
|
||||
Use the `-p` flag to do this:
|
||||
|
||||
```bash
|
||||
$ docker run -p 9000:9000 sigp/lighthouse lighthouse beacon
|
||||
```
|
||||
|
||||
If you use the `--http` flag you may also want to expose the HTTP port with `-p
|
||||
5052:5052`.
|
||||
|
||||
```bash
|
||||
$ docker run -p 9000:9000 -p 5052:5052 sigp/lighthouse lighthouse beacon --http
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user