Skip to content

Commit

Permalink
Fix doc and reduce image size
Browse files Browse the repository at this point in the history
  • Loading branch information
chevdor committed Jul 20, 2018
1 parent a1013ed commit c8b03d4
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
29 changes: 25 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,36 @@

Implementation of a https://polkadot.network node in Rust.

## Press start
## Using Docker

To get up and running with the smallest footprint on your system, you may use the Polkadot Docker image.
You can either build it yourself or use the latest published one:
### The easiest way

The easiest/faster option is to use the latest image.

Let´s first check the version we have. The first time you run this command, the polkadot docker image will be downloaded. This takes a bit of time and bandwidth, be patient:

```
docker run --rm -it polkadot:0.2.0 polkadot --version
```

You can also pass any argument/flag that polkadot supports:

```
docker run --rm -it polkadot:0.2.0 /polkadot/target/debug/polkadot --name "PolkaDocker"
docker run --rm -it polkadot:0.2.0 polkadot --name "PolkaDocker"
```

Once you are done experimenting and picking the best node name :) you can start polkadot as daemon, exposes the polkadot ports and mount a volume that will keep your blockchain data locally:

```
docker run -d -p 30333:30333 -p 9933:9933 -v /my/local/folder:/root/.local/share/Polkadot polkadot:0.2.0 polkadot
```


### Build your own image
To get up and running with the smallest footprint on your system, you may use the Polkadot Docker image.
You can either build it yourself (it takes a while...):


## To play

If you'd like to play with Polkadot, you'll need to install a client like this
Expand Down
1 change: 1 addition & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \
cargo build --$PROFILE && \
cp target/$PROFILE/polkadot /usr/local/bin && \
cargo clean && \
rm -rf /root/.cargo /root/.rustup

WORKDIR /polkadot
EXPOSE 30333 9933
Expand Down
2 changes: 1 addition & 1 deletion docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
VERSION=`grep "^version" ../Cargo.toml | egrep -o "([0-9\.]+)"`

echo "Building polkadot:$VERSION docker image, hang on!"
docker build --build-arg PROFILE=release -t polkadot:$VERSION .
time docker build --build-arg PROFILE=release -t polkadot:$VERSION .

echo "Image is ready"
docker images | grep polkadot

0 comments on commit c8b03d4

Please sign in to comment.