From 93fb824dfce78bd0c77139ebe9d6dee9e9f725ed Mon Sep 17 00:00:00 2001
From: Chevdor <chevdor@users.noreply.github.com>
Date: Sat, 28 Jul 2018 10:14:30 +0200
Subject: [PATCH] Export ws port 9944 and add doc (#440)

Fix #437
---
 substrate/README.adoc       | 19 ++++++++++++++++---
 substrate/docker/Dockerfile |  2 +-
 2 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/substrate/README.adoc b/substrate/README.adoc
index 401419df74f..85ee539b1e6 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 40589c0ac52..dfc4ff77877 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"]
-- 
GitLab