Skip to content

Instantly share code, notes, and snippets.

@ulrichard
Created December 20, 2017 22:40
Show Gist options
  • Save ulrichard/67c2528b6b16806777b33c119c980b28 to your computer and use it in GitHub Desktop.
Save ulrichard/67c2528b6b16806777b33c119c980b28 to your computer and use it in GitHub Desktop.
electron-cash in docker with hardware wallets
FROM debian:testing
#FROM ubuntu:yakkety
MAINTAINER Michal Belica <devel@beli.sk>
EXPOSE 10000
# runs as UID 1000 GID 1000 inside the container
ENV VERSION 3.0
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends curl xpra python3-pyqt5 python3-pip python3-setuptools lzop liblz4-tool sudo
RUN curl -o /tmp/ElectronCash-${VERSION}.tar.gz https://electroncash.org/downloads/${VERSION}/win-linux/ElectronCash-${VERSION}.tar.gz \
&& cd /tmp \
&& mkdir .X11-unix \
&& pip3 install --upgrade pip \
&& pip3 install wheel \
&& pip3 install cython \
&& pip3 install rencode
# install support for the hardware wallet plugins
RUN apt-get update \
&& apt-get install -y build-essential libpython3-dev libusb-1.0-0-dev libudev-dev \
# && pip3 install --upgrade trezor \
&& pip3 install --upgrade keepkey \
&& pip3 install --upgrade btchip-python
RUN pip3 install /tmp/ElectronCash-${VERSION}.tar.gz \
&& test -f /usr/local/bin/electron-cash \
&& rm -vrf /tmp/ElectronCash-${VERSION}.tar.gz \
&& apt-get purge -y python3-pip python3-setuptools curl build-essential \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# disable starting of other programs in default xpra.conf
RUN sed -ie 's/^start-child/#start-child/' /etc/xpra/xpra.conf
RUN useradd -d /home/user -m user \
&& mkdir /electron-cash \
&& ln -s /electron-cash /home/user/.electron-cash \
&& chown user:user /electron-cash \
&& chmod 777 -R /electron-cash \
&& chown root:root /tmp/.X11-unix \
&& chmod 777 -R /tmp/.X11-unix
USER user
ENV HOME /home/user
WORKDIR /home/user
VOLUME /electron-cash
#CMD ["/usr/bin/xpra", "start", ":100", "--compressors=zlib,lz4", "--start-child=/usr/local/bin/electron-cash", "--bind-tcp=0.0.0.0:10000", "--no-daemon", "--no-notifications", "--no-mdns", "--no-pulseaudio", "--exit-with-children"]
CMD "/usr/local/bin/electron-cash"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment