Unverified Commit 597f9512 authored by Muhammad Altabba's avatar Muhammad Altabba Committed by GitHub
Browse files

Update docker.md (#802)

* Update docker.md

Few Edits:
 - Use the `latest` version of polkadot.
 - Add a missing `--` when reporting the version.

* Update docker.md use `westend` chain

> Alex doesn't exist anymore, the current test net is `westend`.
According to https://github.com/paritytech/polkadot/issues/803
parent 103499b7
Pipeline #76305 passed with stages
in 20 minutes and 14 seconds
......@@ -5,34 +5,34 @@ 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:
```bash
docker run --rm -it chevdor/polkadot:0.3.14 polkadot --version
docker run --rm -it chevdor/polkadot:latest polkadot --version
```
You can also pass any argument/flag that polkadot supports:
```bash
docker run --rm -it chevdor/polkadot:0.3.14 polkadot --chain alex --name "PolkaDocker"
docker run --rm -it chevdor/polkadot:latest polkadot --chain westend --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:
```bash
docker run -d -p 30333:30333 -p 9933:9933 -v /my/local/folder:/data chevdor/polkadot:0.3.14 polkadot --chain alex
docker run -d -p 30333:30333 -p 9933:9933 -v /my/local/folder:/data chevdor/polkadot:latest polkadot --chain westend
```
Additionally if you want to have custom node name you can add the `--name "YourName"` at the end
```bash
docker run -d -p 30333:30333 -p 9933:9933 -v /my/local/folder:/data chevdor/polkadot:0.3.14 polkadot --chain alex --name "PolkaDocker"
docker run -d -p 30333:30333 -p 9933:9933 -v /my/local/folder:/data chevdor/polkadot:latest polkadot --chain westend --name "PolkaDocker"
```
```bash
docker run -d -p 30333:30333 -p 9933:9933 -v /my/local/folder:/data chevdor/polkadot:0.3.14 polkadot --rpc-external --chain alex
docker run -d -p 30333:30333 -p 9933:9933 -v /my/local/folder:/data chevdor/polkadot:latest polkadot --rpc-external --chain westend
```
if you want to connect to rpc port 9933, then must add polkadot startup parameter: `--rpc-external`.
**Note:** The `--chain alex` argument is important and you need to add it to the command line. If you are running older node versions (pre 0.3) you don't need it.
**Note:** The `--chain westend` argument is important and you need to add it to the command line. If you are running older node versions (pre 0.3) you don't need it.
### Limiting Resources
......@@ -68,7 +68,7 @@ If you run into issues with polkadot when using docker, please run the following
(replace the tag with the appropriate one if you do not use latest):
```bash
docker run --rm -it chevdor/polkadot:latest polkadot version
docker run --rm -it chevdor/polkadot:latest polkadot --version
```
This will show you the polkadot version as well as the git commit ref that was used to build your container.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment