Skip to content

Commit

Permalink
docker file to create a gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
bret-fusion committed Dec 29, 2018
1 parent 98b7d15 commit b9c6ca8
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 11 deletions.
18 changes: 18 additions & 0 deletions Dockerfile.gtw
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Build Efsn in a stock Go builder container
FROM golang:1.10-alpine as builder

RUN apk add --no-cache make gcc musl-dev linux-headers

ADD . /efsn
RUN cd /efsn && make efsn

# Pull Geth into a second stage deploy alpine container
FROM alpine:latest

RUN apk add --no-cache ca-certificates
# RUN apk add --no-cache jq
COPY --from=builder /efsn/build/bin/efsn /usr/local/bin/

EXPOSE 9001 9001/udp 40401 40401/udp 40402 40402/udp 40404 40404/udp 9001 9001/udp 8001 8001/udp 9000 9000/udp

ENTRYPOINT ["efsn", "--identity", "1", "--datadir", "/fusion-node" , "--port", "8001" , "--syncmode", "full" , "--gcmode=archive", "--rpc" , "--ws", "--rpcaddr" , "0.0.0.0", "--gasprice" , "0", "--rpccorsdomain" , "*", "--wsorigins", "*", "--wsapi", "eth,net,fsn,fsntx", "--rpcapi", "eth,net,fsn,fsntx", "--wsaddr", "0.0.0.0", "--wsport", "9001", "--rpcport", "9000"]
30 changes: 19 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,35 @@

Fusion would like to extend its gratitude to the Ethereum Foundation. Fusion has used the official open-source golang implementation of the Ethereum protocol.

[![API Reference](
https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f676f6c616e672f6764646f3f7374617475732e737667
)](https://godoc.org/github.com/FusionFoundation/efsn)
[![Go Report Card](https://goreportcard.com/badge/github.com/FusionFoundation/efsn)](https://goreportcard.com/report/github.com/FusionFoundation/efsn)
[![Travis](https://travis-ci.org/ethereum/go-ethereum.svg?branch=master)](https://travis-ci.org/ethereum/go-ethereum)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ethereum/go-ethereum?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

Automated builds are available for stable releases and the unstable master branch.
Binary archives are published at https://geth.ethereum.org/downloads/.
## Quick Start on docker

#Build the gateway
docker build --file Dockerfile.gtw -t fusionnetwork/gateway
docker run -it -p 9001:9001 -v /Users/work/dev/dockerVolume/fusion-node:/fusion-node  fusionnetwork/gateway

#Run a gateway
docker run -it -p 9001:9001 -v /Users/work/dev/dockerVolume/fusion-node:/fusion-node  fusionnetwork/gateway

Change the parameter /Users/work/dev/dockerVolume/fusion-node to your local directory

Connect via ws://localhost:9001

#API Reference

Api reference can be found at https://github.com/FUSIONFoundation/web3-fusion-extend

## Building the source

For prerequisites and detailed build instructions please read the
[Installation Instructions](https://github.com/FusionFoundation/efsn/wiki/Building-Ethereum)
on the wiki.

Building geth requires both a Go (version 1.7 or later) and a C compiler.
Building efsn requires both a Go (version 1.7 or later) and a C compiler.
You can install them using your favourite package manager.
Once the dependencies are installed, run

make geth
make efsn

or, to build the full suite of utilities:

Expand All @@ -34,7 +42,7 @@ The go-ethereum project comes with several wrappers/executables found in the `cm

| Command | Description |
|:----------:|-------------|
| **`geth`** | Our main Ethereum CLI client. It is the entry point into the Ethereum network (main-, test- or private net), capable of running as a full node (default), archive node (retaining all historical state) or a light node (retrieving data live). It can be used by other processes as a gateway into the Ethereum network via JSON RPC endpoints exposed on top of HTTP, WebSocket and/or IPC transports. `geth --help` and the [CLI Wiki page](https://github.com/FusionFoundation/efsn/wiki/Command-Line-Options) for command line options. |
| **`efsn`** | Our main Ethereum CLI client. It is the entry point into the Ethereum network (main-, test- or private net), capable of running as a full node (default), archive node (retaining all historical state) or a light node (retrieving data live). It can be used by other processes as a gateway into the Ethereum network via JSON RPC endpoints exposed on top of HTTP, WebSocket and/or IPC transports. `geth --help` and the [CLI Wiki page](https://github.com/FusionFoundation/efsn/wiki/Command-Line-Options) for command line options. |
| `abigen` | Source code generator to convert Ethereum contract definitions into easy to use, compile-time type-safe Go packages. It operates on plain [Ethereum contract ABIs](https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI) with expanded functionality if the contract bytecode is also available. However it also accepts Solidity source files, making development much more streamlined. Please see our [Native DApps](https://github.com/FusionFoundation/efsn/wiki/Native-DApps:-Go-bindings-to-Ethereum-contracts) wiki page for details. |
| `bootnode` | Stripped down version of our Ethereum client implementation that only takes part in the network node discovery protocol, but does not run any of the higher level application protocols. It can be used as a lightweight bootstrap node to aid in finding peers in private networks. |
| `evm` | Developer utility version of the EVM (Ethereum Virtual Machine) that is capable of running bytecode snippets within a configurable environment and execution mode. Its purpose is to allow isolated, fine-grained debugging of EVM opcodes (e.g. `evm --code 60ff60ff --debug`). |
Expand Down

0 comments on commit b9c6ca8

Please sign in to comment.