2017-09-22 00:01:47 +00:00
# ruimarinho/bitcoin-core
A bitcoin-core docker image.
2015-08-12 17:24:40 +00:00
2017-09-22 00:01:47 +00:00
[![ruimarinho/bitcoin-core][docker-pulls-image]][docker-hub-url] [![ruimarinho/bitcoin-core][docker-stars-image]][docker-hub-url] [![ruimarinho/bitcoin-core][docker-size-image]][docker-hub-url] [![ruimarinho/bitcoin-core][docker-layers-image]][docker-hub-url]
2015-08-12 17:24:40 +00:00
2016-02-20 01:31:54 +00:00
## Supported tags and respective `Dockerfile` links
2017-09-22 00:01:47 +00:00
- `0.15.0.1` , `0.15` , `latest` ([0.15/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.15/Dockerfile))
2017-09-22 00:09:18 +00:00
- `0.15.0.1-alpine` , `0.15-alpine` , `latest` ([0.15/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.15/Dockerfile))
2017-09-22 00:01:47 +00:00
- `0.14.2` , `0.14` ([0.14/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.14/Dockerfile))
- `0.14.2-alpine` , `0.14-alpine` ([0.14/alpine/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.14/alpine/Dockerfile))
- `0.13.2-alpine` , `0.13-alpine` ([0.13/alpine/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.13/alpine/Dockerfile))
- `0.13.2` , `0.13` ([0.13/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.13/Dockerfile))
- `0.12.1-alpine` , `0.12-alpine` ([0.12/alpine/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.12/alpine/Dockerfile))
- `0.12.1` , `0.12` ([0.12/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.12/Dockerfile))
- `0.11.2-alpine` , `0.11-alpine` ([0.11/alpine/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.11/alpine/Dockerfile))
- `0.11.2` , `0.11` ([0.11/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.11/Dockerfile))
## What is Bitcoin Core?
2016-02-21 22:26:58 +00:00
_from [bitcoinwiki ](https://en.bitcoin.it/wiki/Bitcoind )_
2015-08-12 17:24:40 +00:00
2017-09-22 00:01:47 +00:00
Bitcoin Core is a reference client that implements the Bitcoin protocol for remote procedure call (RPC) use. It is also the second Bitcoin client in the network's history.
2015-08-12 17:24:40 +00:00
## Usage
### How to use this image
2016-02-21 22:26:58 +00:00
This image contains the main binaries from the Bitcoin Core project - `bitcoind` , `bitcoin-cli` and `bitcoin-tx` . It behaves like a binary, so you can pass any arguments to the image and they will be forwarded to the `bitcoind` binary:
2015-08-12 17:24:40 +00:00
```sh
2017-09-22 00:01:47 +00:00
$ docker run --rm -it ruimarinho/bitcoin-core \
2015-08-12 17:24:40 +00:00
-printtoconsole \
-regtest=1 \
-rpcallowip=172.17.0.0/16 \
-rpcpassword=bar \
2016-02-21 22:26:58 +00:00
-rpcuser=foo
2015-08-12 17:24:40 +00:00
```
2017-09-22 00:01:47 +00:00
By default, `bitcoind` will run as user `bitcoin` for security reasons and with its default data dir (`~/.bitcoin`). If you'd like to customize where `bitcoin-core` stores its data, you must use the `BITCOIN_DATA` environment variable. The directory will be automatically created with the correct permissions for the `bitcoin` user and `bitcoin-core` automatically configured to use it.
2015-08-12 17:24:40 +00:00
2016-02-21 22:26:58 +00:00
```sh
2017-09-22 00:01:47 +00:00
$ docker run --env BITCOIN_DATA=/var/lib/bitcoin-core --rm -it ruimarinho/bitcoin-core \
2016-02-21 22:26:58 +00:00
-printtoconsole \
-regtest=1
2015-08-12 17:24:40 +00:00
```
2016-02-21 22:26:58 +00:00
You can also mount a directory it in a volume under `/home/bitcoin/.bitcoin` in case you want to access it on the host:
```sh
2017-09-22 00:01:47 +00:00
$ docker run -v ${PWD}/data:/home/bitcoin/.bitcoin -it --rm ruimarinho/bitcoin-core \
2015-08-12 17:24:40 +00:00
-printtoconsole \
2016-02-21 22:26:58 +00:00
-regtest=1
2015-08-12 17:24:40 +00:00
```
2016-02-27 20:15:26 +00:00
You can optionally create a service using `docker-compose` :
2016-02-21 22:26:58 +00:00
```yml
2017-09-22 00:01:47 +00:00
bitcoin-core:
image: ruimarinho/bitcoin-core
2016-02-21 22:26:58 +00:00
command:
-printtoconsole
-regtest=1
```
2015-08-12 17:24:40 +00:00
2016-02-21 22:26:58 +00:00
## Image variants
2017-09-22 00:01:47 +00:00
The `ruimarinho/bitcoin-core` image comes in multiple flavors:
2015-08-12 17:24:40 +00:00
2017-09-22 00:01:47 +00:00
### `ruimarinho/bitcoin-core:latest`
2016-02-21 22:26:58 +00:00
Points to the latest release available of Bitcoin Core. Occasionally pre-release versions will be included.
2015-08-12 17:24:40 +00:00
2017-09-22 00:01:47 +00:00
### `ruimarinho/bitcoin-core:<version>`
Based on a slim Debian image, targets a specific version branch or release of Bitcoin Core.
2015-08-12 17:24:40 +00:00
2017-09-22 00:01:47 +00:00
### `ruimarinho/bitcoin-core:<version>-alpine`
Based on Alpine Linux with Berkeley DB 4.8 (cross-compatible build), targets a specific version branch or release of Bitcoin Core.
2015-08-12 17:24:40 +00:00
2016-02-21 22:26:58 +00:00
## Supported Docker versions
2016-09-17 22:06:24 +00:00
This image is officially supported on Docker version 1.12, with support for older versions provided on a best-effort basis.
2015-08-12 17:24:40 +00:00
## License
[License information ](https://github.com/bitcoin/bitcoin/blob/master/COPYING ) for the software contained in this image.
2017-09-22 00:01:47 +00:00
[License information ](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/LICENSE ) for the [ruimarinho/docker-bitcoin-core ](https://hub.docker.com/r/ruimarinho/bitcoin-core ) docker project.
2015-08-12 17:24:40 +00:00
2017-09-22 00:01:47 +00:00
[docker-hub-url]: https://hub.docker.com/r/ruimarinho/bitcoin-core
[docker-layers-image]: https://img.shields.io/imagelayers/layers/ruimarinho/bitcoin-core/latest.svg?style=flat-square
[docker-pulls-image]: https://img.shields.io/docker/pulls/ruimarinho/bitcoin-core.svg?style=flat-square
[docker-size-image]: https://img.shields.io/imagelayers/image-size/ruimarinho/bitcoin-core/latest.svg?style=flat-square
[docker-stars-image]: https://img.shields.io/docker/stars/ruimarinho/bitcoin-core.svg?style=flat-square