Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Electrumx docker build statisfy new electrumx versions #70

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 34 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,42 @@
ARG VERSION=1.16.0
ARG VERSION=master

FROM python:3.7-alpine3.11
FROM python:3.9.16-slim-bullseye
LABEL maintainer="Luke Childs <lukechilds123@gmail.com>"

ARG VERSION

COPY ./bin /usr/local/bin

RUN 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/v3.11/main leveldb-dev && \
apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing rocksdb-dev && \
pip install aiohttp pylru plyvel websockets python-rocksdb uvloop && \
git clone -b $VERSION https://github.com/spesmilo/electrumx.git && \
cd electrumx && \
python setup.py install && \
apk del git build-base && \
rm -rf /tmp/*
apt-get update &&\
apt-get install -y --no-install-suggests --no-install-recommends\
gcc \
g++ \
git \
libbz2-dev \
liblz4-dev \
zlib1g-dev \
libsnappy-dev \
libleveldb-dev \
librocksdb-dev \
&& pip install uvloop \
&& rm -rf /var/lib/apt/lists/* \
&& git clone https://github.com/spesmilo/electrumx.git \
&& cd electrumx \
&& git checkout ${VERSION} \
&& pip install -r requirements.txt \
&& python setup.py install \
&& apt purge -y \
gcc \
g++ \
git \
libbz2-dev \
liblz4-dev \
zlib1g-dev \
libsnappy-dev \
libleveldb-dev \
librocksdb-dev \
&& rm -rf /tmp/*

VOLUME ["/data"]
ENV HOME /data
Expand All @@ -27,6 +47,9 @@ ENV SERVICES=tcp://:50001,ssl://:50002,wss://:50004,rpc://0.0.0.0:8000
ENV SSL_CERTFILE ${DB_DIRECTORY}/electrumx.crt
ENV SSL_KEYFILE ${DB_DIRECTORY}/electrumx.key
ENV HOST ""

USER 65534

WORKDIR /data

EXPOSE 50001 50002 50004 8000
Expand Down
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,23 @@ docker run \
lukechilds/electrumx:v1.8.7
```

## Build

Define the spesmilo electrumx target branch

`Default branch: master`

```
export VERSION=master
```

Get the build
```
docker build . \
-t lukechilds/electrumx:${VERSION}
--build-args VERSION=${VERSION}
```

## License

MIT © Luke Childs