Created
August 21, 2023 12:50
-
-
Save yisiper/32e3265cb025e65987e43ccf4af968c5 to your computer and use it in GitHub Desktop.
Electrumsv 1.3 dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.9.17-slim-bullseye as base | |
RUN set -x; apt-get update && apt-get upgrade -y --no-install-recommends | |
FROM base as compile-image | |
RUN apt-get install -y build-essential --no-install-recommends && \ | |
apt-get install -y libgl1 libqt5gui5 libusb-dev libusb-1.0-0-dev libhidapi-dev python3-hidapi python3-hid \ | |
libudev-dev libgudev-1.0-0 libudev1 python3-pyudev \ | |
git \ | |
&& pip install --upgrade pip \ | |
&& apt-get autoremove && apt-get autoclean && rm -rf /var/lib/apt/lists/* | |
WORKDIR / | |
RUN git clone --depth 1 --branch releases/1.3 https://github.com/electrumsv/electrumsv | |
RUN python3 -m pip install -U pysqlite3-binary && pip3 install wheel cython==0.29.36 | |
RUN pip3 install --user -r electrumsv/contrib/deterministic-build/linux-py3.9-requirements-electrumsv.txt | |
FROM base | |
COPY --from=compile-image /root/.local /root/.local | |
COPY --from=compile-image electrumsv electrumsv | |
RUN apt-get install -y libqt5gui5 python3-hidapi python3-hid --no-install-recommends && rm -rf /var/lib/apt/lists/* | |
WORKDIR / | |
ENV QT_DEBUG_PLUGINS=1 | |
CMD [ "python3", "./electrumsv/electrum-sv" ] | |
# Try run this on host when xcb related errors | |
# sudo apt-get install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev | |
# libxcb-xinerama0 | |
# docker build -t electrumsv . | |
# xhost + | |
# bind dir, store wallet files to host | |
# docker run -it --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --mount type=bind,source="$(pwd)",target=/app electrumsv | |
# xhost - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment