commit d19d5388b4c4b3f04f636e85de8bef86254e15f7 Author: Luke Childs Date: Tue Sep 19 16:08:27 2017 +0100 Initial commit diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..6ddde0e --- /dev/null +++ b/.travis.yml @@ -0,0 +1,7 @@ +sudo: required +services: + - docker +script: docker build -t electrumx . && ( docker run electrumx cat /electrumx/server/version.py | tee /dev/stderr | grep -q "'ElectrumX $(cat VERSION)'" ) 2>&1 +notifications: + email: + on_success: never diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0673c7e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,29 @@ +FROM python:3.6-alpine3.6 +LABEL maintainer="Luke Childs " + +VOLUME ["/data"] + +COPY ./VERSION /tmp + +RUN VERSION=$(cat /tmp/VERSION) && \ + chmod a+x /usr/local/bin/* && \ + apk add --no-cache git build-base && \ + apk add --no-cache --repository http://nl.alpinelinux.org/alpine/edge/testing leveldb-dev && \ + pip install aiohttp pylru plyvel && \ + git clone -b $VERSION https://github.com/kyuupichan/electrumx.git && \ + cd electrumx && \ + python setup.py install && \ + apk del git build-base && \ + rm -rf /tmp/* + +RUN addgroup -S electrumx && adduser -S -g electrumx electrumx && \ + chown -R electrumx:electrumx /data + +USER electrumx +ENV HOME /data +ENV DB_DIRECTORY /data +WORKDIR /data + +EXPOSE 50001 50002 + +CMD ["/electrumx/electrumx_server.py"] 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..32c79e8 --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ + +# docker-electrumx + +[![Build Status](https://travis-ci.org/lukechilds/docker-electrumx.svg?branch=master)](https://travis-ci.org/lukechilds/docker-electrumx) +[![Image Layers](https://images.microbadger.com/badges/image/lukechilds/electrumx.svg)](https://microbadger.com/images/lukechilds/electrumx) +[![Docker Pulls](https://img.shields.io/docker/pulls/lukechilds/electrumx.svg)](https://hub.docker.com/r/lukechilds/electrumx/) + +> Run an Electrum server with one command + +An easily configurable Docker image for running an Electrum server. + +## License + +MIT © Luke Childs diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..9459d4b --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +1.1