From 495172c5851cc6681111085eff0ca820c207b8ac Mon Sep 17 00:00:00 2001 From: aaron <62870322+armatrix@users.noreply.github.com> Date: Tue, 24 Nov 2020 16:59:45 +0800 Subject: [PATCH] Update docker.md (#2000) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit when you use `CMD ["/usr/local/bin/polkadot"]` in dockerfile, you don’t need to use `polkadot` while creating a container. --- polkadot/doc/docker.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/polkadot/doc/docker.md b/polkadot/doc/docker.md index c2c437a647..1d3b860a06 100644 --- a/polkadot/doc/docker.md +++ b/polkadot/doc/docker.md @@ -7,29 +7,29 @@ the polkadot binary, pulled from our package repository. 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 parity/polkadot:latest polkadot --version +docker run --rm -it parity/polkadot:latest --version ``` You can also pass any argument/flag that polkadot supports: ```bash -docker run --rm -it parity/polkadot:latest polkadot --chain westend --name "PolkaDocker" +docker run --rm -it parity/polkadot:latest --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 parity/polkadot:latest polkadot --chain westend +docker run -d -p 30333:30333 -p 9933:9933 -v /my/local/folder:/data parity/polkadot:latest --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 parity/polkadot:latest polkadot --chain westend --name "PolkaDocker" +docker run -d -p 30333:30333 -p 9933:9933 -v /my/local/folder:/data parity/polkadot:latest --chain westend --name "PolkaDocker" ``` ```bash -docker run -d -p 30333:30333 -p 9933:9933 -v /my/local/folder:/data parity/polkadot:latest polkadot --rpc-external --chain westend +docker run -d -p 30333:30333 -p 9933:9933 -v /my/local/folder:/data parity/polkadot:latest --rpc-external --chain westend ``` If you want to connect to rpc port 9933, then must add polkadot startup parameter: `--rpc-external`. @@ -70,7 +70,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 parity/polkadot:latest polkadot --version +docker run --rm -it parity/polkadot:latest --version ``` This will show you the polkadot version as well as the git commit ref that was used to build your container.