docker.adoc 1.42 KiB
Newer Older

== Using Docker

=== 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:

[source, shell]
docker run --rm -it chevdor/polkadot:0.2.0 polkadot --version

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

[source, shell]
docker run --rm -it chevdor/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:

[source, shell]
docker run -d -p 30333:30333 -p 9933:9933 -v /my/local/folder:/data chevdor/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...):

[source, shell]
----
ccd docker
./build.sh
----

=== Reporting issues

If you run into issues with polkadot when using docker, please run the following command
(replace the tag with the appropriate one if you do not use latest):

[source, shell]
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.
Just paste that in the issue you create.