From dd8dad4ae9868afa1301adf207efa61751195416 Mon Sep 17 00:00:00 2001
From: Parsa
Date: Fri, 31 Mar 2023 22:42:15 +0430
Subject: [PATCH] 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
---
Dockerfile | 42 +++++++++++++++++++++++++++++++-----------
1 file changed, 31 insertions(+), 11 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index 81b95ef..91c7748 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,6 @@
-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 "
ARG VERSION
@@ -8,15 +8,35 @@ 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