Skip to content

Commit c4cce37

Browse files
committed
dockerfile: change dockerfile to resolve packages
There was some unsatisfiable packages in python3.7-alpine3.11 which cause errors and broken build, I decide to change the container to python:3.9.16-slim-bullseye which use more disk space but fixed the packages problem use user nobody support dash_hash
1 parent 8ebfaed commit c4cce37

File tree

1 file changed

+34
-11
lines changed

1 file changed

+34
-11
lines changed

Dockerfile

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,42 @@
1-
ARG VERSION=1.16.0
1+
ARG VERSION=master
22

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

66
ARG VERSION
77

88
COPY ./bin /usr/local/bin
99

1010
RUN chmod a+x /usr/local/bin/* && \
11-
apk add --no-cache git build-base openssl && \
12-
apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.11/main leveldb-dev && \
13-
apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing rocksdb-dev && \
14-
pip install aiohttp pylru plyvel websockets python-rocksdb uvloop && \
15-
git clone -b $VERSION https://github.com/spesmilo/electrumx.git && \
16-
cd electrumx && \
17-
python setup.py install && \
18-
apk del git build-base && \
19-
rm -rf /tmp/*
11+
apt-get update &&\
12+
apt-get install -y --no-install-suggests --no-install-recommends\
13+
gcc \
14+
g++ \
15+
git \
16+
libbz2-dev \
17+
liblz4-dev \
18+
zlib1g-dev \
19+
libsnappy-dev \
20+
libleveldb-dev \
21+
librocksdb-dev \
22+
&& pip install uvloop \
23+
&& rm -rf /var/lib/apt/lists/* \
24+
&& git clone https://github.com/spesmilo/electrumx.git \
25+
&& cd electrumx \
26+
&& git checkout ${VERSION} \
27+
&& pip install -r requirements.txt \
28+
&& python setup.py install \
29+
&& apt purge -y \
30+
gcc \
31+
g++ \
32+
git \
33+
libbz2-dev \
34+
liblz4-dev \
35+
zlib1g-dev \
36+
libsnappy-dev \
37+
libleveldb-dev \
38+
librocksdb-dev \
39+
&& rm -rf /tmp/*
2040

2141
VOLUME ["/data"]
2242
ENV HOME /data
@@ -27,6 +47,9 @@ ENV SERVICES=tcp://:50001,ssl://:50002,wss://:50004,rpc://0.0.0.0:8000
2747
ENV SSL_CERTFILE ${DB_DIRECTORY}/electrumx.crt
2848
ENV SSL_KEYFILE ${DB_DIRECTORY}/electrumx.key
2949
ENV HOST ""
50+
51+
USER 65534
52+
3053
WORKDIR /data
3154

3255
EXPOSE 50001 50002 50004 8000

0 commit comments

Comments
 (0)