Skip to content

Latest commit

 

History

History
51 lines (34 loc) · 1.51 KB

README.md

File metadata and controls

51 lines (34 loc) · 1.51 KB

Gladius Network Gateway

See the main gladius-node repository to see more.

Docker

Running the Network Gateway in a docker container

From Docker Hub

$ docker run -it -v YOUR_GLADIUS_PATH:/root/.gladius -p 7947:7947 \
    -p 3001:3001 gladiusio/network-gateway:latest

Build from GitHub

$ docker build --tag=gladiusio/network-gateway .

$ docker run -it -v $(pwd)/gladius:/root/.gladius -p 7947:7947 -p 3001:3001 \
    gladiusio/network-gateway:latest
  • Runs the container mapping the local ./gladius folder in this directory to the Docker container
  • Sets both used ports to the relevant machine ports

Build from source

For your machine

You will need Go 1.11.4 or higher (some issues with go mod checksums below that)

Run make. The binary will be in ./build

Cross compile

Check out the gladius-node repository for Dockerized cross compilation.

Run linter

Optionally, you can install and run linting tools:

go get gopkg.in/alecthomas/gometalinter.v2
gometalinter.v2 --install
make lint

API Documentation

Slate docs coming soon

Known issues

  • You will need to install glibc on systems that don't have it by default (like alpine linux) to be able to run if the binary is dynamically linked. This is due to the C bindings that Ethereum has. One way to fix this is to statically compile the Go binary with -ldflags '-w -extldflags "-static"