kylemanna
5/31/2014 - 8:08 AM

Docker + Bitcoin Node + Digital Ocean + Ubuntu 14.04

Docker + Bitcoin Node + Digital Ocean + Ubuntu 14.04

#!/bin/bash

#
# Configure an Ubuntu 14.04 LTS machine for docker image
#

set -ex

if [ $(swapon -s | wc -l) -lt 2 ]; then
   fallocate -l 512M /swap
   mkswap /swap
   echo "/swap swap swap defaults 0 0" >> /etc/fstab
   swapon -a
fi

free -m

curl https://get.docker.io/gpg | apt-key add -
echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list
apt-get update && apt-get install -y lxc-docker

docker run --name=bitcoind-data kylemanna/bitcoind init
docker run --volumes-from=bitcoind-data --name=bitcoind-node -p 8333:8333 kylemanna/bitcoind