|
|
|
FROM python:3.7-alpine3.7
|
|
|
|
LABEL maintainer="Luke Childs <lukechilds123@gmail.com>"
|
|
|
|
|
|
|
|
COPY ./bin /usr/local/bin
|
|
|
|
COPY ./VERSION /tmp
|
|
|
|
|
|
|
|
RUN VERSION=$(cat /tmp/VERSION) && \
|
|
|
|
chmod a+x /usr/local/bin/* && \
|
|
|
|
apk add --no-cache git build-base openssl && \
|
|
|
|
apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community 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/*
|
|
|
|
|
|
|
|
VOLUME ["/data"]
|
|
|
|
ENV HOME /data
|
|
|
|
ENV ALLOW_ROOT 1
|
|
|
|
ENV DB_DIRECTORY /data
|
|
|
|
ENV SERVICES=tcp://:50001,ssl://:50002,wss://:50004,rpc://:8000
|
|
|
|
ENV SSL_CERTFILE ${DB_DIRECTORY}/electrumx.crt
|
|
|
|
ENV SSL_KEYFILE ${DB_DIRECTORY}/electrumx.key
|
|
|
|
ENV HOST ""
|
|
|
|
WORKDIR /data
|
|
|
|
|
|
|
|
EXPOSE 50001 50002 50004 8000
|
|
|
|
|
|
|
|
CMD ["init"]
|