GithubHelp home page GithubHelp logo

whatupdave / docker-bitcoind Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kylemanna/docker-bitcoind

0.0 1.0 0.0 290 KB

Docker image that runs a bitcoind node in a container for easy deployment

License: MIT License

docker-bitcoind's Introduction

docker-bitcoind

Docker image that runs a bitcoind node in a container for easy deployment.

Requirements

  • Machine, Cloud, or VPS that supports Docker (i.e. EC2 Digital Ocean, KVM or XEN based VMs) running something like Ubuntu 14.04 or later (not OpenVZ containers!)
  • At least 30 GB to store the block chain files
  • 1GB RAM (maybe less, haven't test)

Tested on Digital Ocean's 1GB / 1 CPU / 30GB droplet.

Really Fast Quick Start

One liner for Ubuntu 14.04 LTS machines with JSON-RPC enabled on localhost:

$ curl https://raw.githubusercontent.com/kylemanna/docker-bitcoind/master/bootstrap-host.sh | sh -s trusty

Quick Start

  1. Create a bitcoind-data volume to persist the bitcoind blockchain data, should exit immediately. The bitcoind-data container will store the blockchain when the node container is remade later (software upgrade, reboot, etc):

     $ docker run --name=bitcoind-data kylemanna/bitcoind init
    
  2. Run a Bitcoin node and use the data volume:

     $ docker run --volumes-from=bitcoind-data --name=bitcoind-node -d -p 8333:8333 kylemanna/bitcoind
     5144bdf31fa689e166fe3a8e1a3befd2b28bbb1bd48207f4583c072207124a10
    
  3. Verify that the container is running:

     $ docker ps
     CONTAINER ID        IMAGE                       COMMAND                CREATED             STATUS              PORTS                              NAMES
     5144bdf31fa6        kylemanna/bitcoind:latest   /bitcoin/bitcoind.sh   6 seconds ago       Up 5 seconds        0.0.0.0:8333->8333/tcp, 8332/tcp   bitcoind-node
    

Debugging

$ docker run --volumes-from=bitcoind-data --rm -it -p 8333:8333 kylemanna/bitcoind bitcoind -printtoconsole -disablewallet
$ docker run --volumes-from=bitcoind-data --rm -it -p 8333:8333 kylemanna/bitcoind shell

Enable JSON-RPC

The following Docker run line will create a container with JSON-RPC enabled and will only allow Docker host to access the JSON RPC port 8332.

$ docker run --volumes-from=bitcoind-data --name=bitcoind-node -d -p 8333:8333 -p 127.0.0.1:8332:8332 kylemanna/bitcoind bitcoind -disablewallet -rpcallowip=*

Todo

  • Add Ubuntu 14.04 quick start guide
  • Add Ubuntu upstart init script
  • Review possiblity of bootstraping blockchain via BitTorrent

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.