Skip to content

Commit

Permalink
dockerfile: change dockerfile to resolve packages
Browse files Browse the repository at this point in the history
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
  • Loading branch information
parsa97 committed Mar 31, 2023
1 parent 8ebfaed commit dd8dad4
Showing 1 changed file with 31 additions and 11 deletions.
42 changes: 31 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 <[email protected]>"

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 \
&& rm -rf /var/lib/apt/lists/*

RUN pip install aiohttp pylru plyvel websockets python-rocksdb uvloop aiorpcx

RUN git clone -b $VERSION https://github.com/spesmilo/electrumx.git \
&& cd electrumx \
&& 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 Down

0 comments on commit dd8dad4

Please sign in to comment.