git clone https://github.com/HaschekSolutions/bitcoin-alpine.git
cd bitcoin-alpine
docker build -t hascheksolutions/bitcoin-alpine .
You can mount /bitcoin
so you have persistant storage like so:
docker run -v /data/bitcoin/.bitcoin/:/bitcoin --name=bitcoin -d -p 8333:8333 -p 8332:8332 \
--restart=always \
-e RPCUSER=yourusername \
-e RPCPASSWORD=yourpassword \
hascheksolutions/bitcoin-alpine
Since we're running Alpine we don't have bash, but we have ash
docker exec -it bitcoin ash