docker-bitcoin-core/README.md

94 lines
3.9 KiB
Markdown
Raw Normal View History

2015-08-12 17:24:40 +00:00
# seegno/bitcoind
A bitcoind docker image.
2016-02-21 22:26:58 +00:00
[![seegno/bitcoind][docker-pulls-image]][docker-hub-url] [![seegno/bitcoind][docker-stars-image]][docker-hub-url] [![seegno/bitcoind][docker-size-image]][docker-hub-url] [![seegno/bitcoind][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
2016-02-21 22:26:58 +00:00
- `0.12.0-alpine`, `0.12-alpine` ([0.12/alpine/Dockerfile](https://github.com/seegno/docker-bitcoind/blob/master/0.12/alpine/Dockerfile))
- `0.12.0rc5`, `0.12`, `latest` ([0.12/Dockerfile](https://github.com/seegno/docker-bitcoind/blob/master/0.12/Dockerfile))
- `0.11-alpine` ([0.11/alpine/Dockerfile](https://github.com/seegno/docker-bitcoind/blob/master/0.11/alpine/Dockerfile))
- `0.11.2`, `0.11` ([0.11/Dockerfile](https://github.com/seegno/docker-bitcoind/blob/master/0.11/Dockerfile))
2016-02-20 01:31:54 +00:00
2015-08-12 17:24:40 +00:00
## What is bitcoind?
2016-02-21 22:26:58 +00:00
_from [bitcoinwiki](https://en.bitcoin.it/wiki/Bitcoind)_
2015-08-12 17:24:40 +00:00
bitcoind is a program that implements the Bitcoin protocol for remote procedure call (RPC) use. It is also the second Bitcoin client in the network's history.
## 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
2016-02-03 01:11:49 +00:00
$ docker run --rm -it seegno/bitcoind \
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
```
2016-02-21 22:26:58 +00:00
By default, `bitcoind` will run as as user `bitcoin` for security reasons and with its default data dir (`~/.bitcoin`). If you'd like to customize where `bitcoind` 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 `bitcoind` automatically configured to use it.
2015-08-12 17:24:40 +00:00
2016-02-21 22:26:58 +00:00
```sh
$ docker run --env BITCOIN_DATA=/var/lib/bitcoind --rm -it seegno/bitcoind \
-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
$ docker run -v ${PWD}/data:/home/bitcoin/.bitcoin -it --rm seegno/bitcoind \
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-03 01:11:49 +00:00
You can optionally create a `Dockerfile` in the root of your application directory:
```Dockerfile
2016-02-21 22:26:58 +00:00
FROM seegno/bitcoind
2016-02-03 01:11:49 +00:00
```
Then simply run:
```sh
2016-02-21 22:26:58 +00:00
$ docker build -t my/bitcoind
$ docker run --rm -it my/bitcoind
2016-02-03 01:11:49 +00:00
```
2016-02-21 22:26:58 +00:00
Or with `docker-compose`:
```yml
bitcoind:
image: seegno/bitcoind
command:
-printtoconsole
-regtest=1
```
2015-08-12 17:24:40 +00:00
2016-02-21 22:26:58 +00:00
## Image variants
The `seegno/bitcoind` image comes in multiple flavors:
2015-08-12 17:24:40 +00:00
### `seegno/bitcoind: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
### `seegno/bitcoind:<version>`
2016-02-21 22:26:58 +00:00
Based on a slim Debian image, targets a specific version branch or release of Bitcoin Core (e.g. `0.12.0rc5`, `0.12`).
2015-08-12 17:24:40 +00:00
2016-02-21 22:26:58 +00:00
### `seegno/bitcoind:<version>-alpine`
Based on Alpine Linux with Berkeley DB 4.8 (cross-compatible build), targets a specific version branch or release of Bitcoin Core (e.g. `0.12.0rc5`, `0.12`).
2015-08-12 17:24:40 +00:00
2016-02-21 22:26:58 +00:00
## Supported Docker versions
This image is officially supported on Docker version 1.10, 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.
2016-02-03 01:11:49 +00:00
[License information](https://github.com/seegno/docker-bitcoind/blob/master/LICENSE) for the [seegno/docker-bitcoind](https://hub.docker.com/r/seegno/bitcoind) docker project.
2015-08-12 17:24:40 +00:00
2016-01-13 01:17:29 +00:00
[docker-hub-url]: https://hub.docker.com/r/seegno/bitcoind
[docker-layers-image]: https://img.shields.io/imagelayers/layers/seegno/bitcoind/latest.svg
[docker-pulls-image]: https://img.shields.io/docker/pulls/seegno/bitcoind.svg
[docker-size-image]: https://img.shields.io/imagelayers/image-size/seegno/bitcoind/latest.svg
[docker-stars-image]: https://img.shields.io/docker/stars/seegno/bitcoind.svg