Skip to content

primecoin/docker-primecoind

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

primecoin/primecoind

Primecoind docker image. Provides a classic primecoin binary built from the github/primecoin repository.

Usage

$ docker run --name primecoind \
  -v /home/ubuntu/docker-primecoind-data:/data \
  -p 9911:9911 \
  -p 9912:9912 \
  -d primecoin/primecoind \
  -txindex \
  -printtoconsole \
  -rpcallowip=0.0.0.0/0 \
  -rpcpassword=bar \
  -rpcuser=foo

Usage - More Explanations

How to use this image

It behaves like a command, so you can pass any arguments to the image and they will be forwarded to the primecoind binary:

$ docker run --name primecoind -d primecoin/primecoind \
  -rpcallowip=0.0.0.0/0 \
  -rpcpassword=bar \
  -rpcuser=foo

Use the same command to start the testnet container:

$ docker run --name primecoind-testnet -d primecoin/primecoind \
  -rpcallowip=0.0.0.0/0 \
  -rpcpassword=bar \
  -rpcuser=foo \
  -testnet

By default, primecoin will run as as user primecoin for security reasons and store data in /data. If you'd like to customize where primecoin stores its data, use the XPM_DATA environment variable. The directory will be automatically created with the correct permissions for the user and primecoin automatically configured to use it.

$ docker run --env XPM_DATA=/var/lib/primecoin --name primecoind -d primecoin/primecoind

You can also mount a host directory at /data like so:

$ docker run -v /opt/primecoin:/data --name primecoind -d primecoin/primecoind

That will allow access to /data in the container as /opt/primecoin on the host.

$ docker run -v ${PWD}/data:/data --name primecoind -d primecoin/primecoind

will mount the data sub-directory at /data in the container.

To map container RPC ports to localhost use the -p argument with docker run:

$ docker run -p 9912:9912 --name primecoind -d primecoin/primecoind -rpcallowip=*

You may want to change the port that it is being mapped to if you already run a primecoind instance on the host.

For example: -p 9999:9912 will map container port 9912 to host port 9999.

Now you will be able to curl primecoind in the container:

curl --user foo:bar --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockchaininfo", "params": [] }' -H 'content-type: text/plain;' localhost:9912/

Supported branches to build

The default build for development of primecoin-0.2/satoshi-0.16 uses the development branch primecoin-0.16.3. To build other compatible satoshi-0.16 branches use the branch build option:

docker build 0.2 --build-arg branch=<primecoin-repo-branch-name>

Packages

No packages published

Languages

  • Dockerfile 64.5%
  • Shell 35.5%