From b270d2fdb0bd575cdc63331181a2a1f66ec416ad Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Sun, 17 Sep 2017 20:18:00 +0100 Subject: [PATCH] Initial commit --- Dockerfile | 19 +++++++++++++++++++ LICENSE | 21 +++++++++++++++++++++ README.md | 16 ++++++++++++++++ bin/init | 16 ++++++++++++++++ 4 files changed, 72 insertions(+) create mode 100644 Dockerfile create mode 100644 LICENSE create mode 100644 README.md create mode 100644 bin/init diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..338919e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM ubuntu:16.04 +MAINTAINER Luke Childs + +RUN apt-get update +RUN apt-get install -y curl unzip +RUN curl -L https://github.com/vertcoin/vertcoin/releases/download/v0.11.1.0/vertcoin-v0.11.1.0-linux-64bit.zip --output prebuilt.zip +RUN unzip prebuilt.zip +RUN mv vertcoind /usr/local/bin + +ADD ./bin /usr/local/bin +RUN chmod a+x /usr/local/bin/* + +VOLUME ["/data"] +ENV HOME /data +WORKDIR /data + +EXPOSE 8332 8333 + +ENTRYPOINT ["init"] diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f27ee9b --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Luke Childs + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..40b8163 --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ + +# docker-vertcoind + +[![Docker Stars](https://img.shields.io/docker/stars/lukechilds/vertcoind.svg)](https://hub.docker.com/r/lukechilds/vertcoind/) +[![Docker Pulls](https://img.shields.io/docker/pulls/lukechilds/vertcoind.svg)](https://hub.docker.com/r/lukechilds/vertcoind/) + +> Run a full Vertcoin node with one command + +A Docker configuration with sane defaults for running a full +Vertcoin node. + +## Usage + +``` +docker run -v /home/username/vertcoin:/data -p 8333:8333 lukechilds/vertcoind +``` diff --git a/bin/init b/bin/init new file mode 100644 index 0000000..79fca60 --- /dev/null +++ b/bin/init @@ -0,0 +1,16 @@ +#!/bin/bash + +DATA_DIR=/data +CONF=${DATA_DIR}/vertcoin.conf + +if [ ! -e "${CONF}" ]; then + echo "No vertcoin.conf found, creating one for you." + echo "disablewallet=1 +printtoconsole=1 +rpcport=8332 +rpcallowip=::/0 +rpcuser=rpc +rpcpassword=`dd if=/dev/urandom bs=18 count=1 2>/dev/null | base64`" > "${CONF}" +fi + +exec vertcoind -datadir=${DATA_DIR} -conf=${CONF}