diff --git a/substrate/README.adoc b/substrate/README.adoc index 401419df74fef9fa222af88044dc37dd58532a30..85ee539b1e67559b1ac7a39d87f784a67b1c6e2c 100644 --- a/substrate/README.adoc +++ b/substrate/README.adoc @@ -113,21 +113,34 @@ cargo run -- --dev The easiest/faster option is to use the latest image. + +.First run 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: [source, shell] -docker run --rm -it chevdor/polkadot:0.2.0 ./version +docker run --rm -it chevdor/polkadot:latest ./version + +.Polkadot arguments You can also pass any argument/flag that polkadot supports: [source, shell] -docker run --rm -it chevdor/polkadot:0.2.0 polkadot --name "PolkaDocker" +docker run --rm -it chevdor/polkadot:latest polkadot --name "PolkaDocker" + +.Run as deamon 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: [source, shell] -docker run -d -p 30333:30333 -p 9933:9933 -v /my/local/folder:/data chevdor/polkadot:0.2.0 polkadot +docker run -d -p 30333:30333 -p 9933:9933 -p 9944:9944 -v /my/local/folder:/data chevdor/polkadot:latest polkadot + +.Docker image update +If you have an image such as `latest` locally, docker will *not* bother downloading the very latest that may be available. +To update: +- stop and delete your containers (`docker stop ...` `docker rm ...`) +- delete your previous image (`docker rmi chevdor/polkadot:latest`) +- run as daemon again, the very latest image will be downloaded again === Build your own image diff --git a/substrate/docker/Dockerfile b/substrate/docker/Dockerfile index 40589c0ac528744f55772c93504bf4d35453af34..dfc4ff77877b1595f1521b3db0e874467ffc8419 100644 --- a/substrate/docker/Dockerfile +++ b/substrate/docker/Dockerfile @@ -27,7 +27,7 @@ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \ COPY version /polkadot WORKDIR /polkadot -EXPOSE 30333 9933 +EXPOSE 30333 9933 9944 VOLUME ["/data"] CMD ["/bin/sh", "polkadot"]