add docker support

This commit is contained in:
Rene Zbinden 2018-01-31 23:46:50 +01:00
parent c3394c34e8
commit 9d20443b90
4 changed files with 43 additions and 0 deletions

24
Dockerfile Normal file
View File

@ -0,0 +1,24 @@
FROM ubuntu:18.04
ENV VERSION 1.0.2
RUN set -x \
&& apt-get update \
&& apt-get install -y curl \
&& curl -sL https://github.com/BTCP-community/electrum-zcl/archive/Z!${VERSION}.tar.gz |tar xzv \
&& mv electrum-zcl-Z-${VERSION} electrum-zcl \
&& cd electrum-zcl \
&& apt-get install -y $(grep -vE "^\s*#" packages.txt | tr "\n" " ") \
&& pip3 install -r requirements.txt \
&& pip3 install pyblake2 \
&& protoc --proto_path=lib/ --python_out=lib/ lib/paymentrequest.proto \
&& pyrcc5 icons.qrc -o gui/qt/icons_rc.py \
&& ./contrib/make_locale
WORKDIR /electrum-zcl
ENV DISPLAY :0
CMD ./electrum

View File

@ -119,6 +119,16 @@ Run::
./electrum
For Linux with docker:
----------------------
Build the docker image::
./build-docker.sh
Run the docker image::
./run-docker.sh
Building Releases

3
build-docker.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
docker build -t electrum-zcl:latest .

6
run-docker.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
XSOCK=/tmp/.X11-unix
XAUTH=/tmp/.docker.xauth
DATADIR=.electrum-zcl
xauth nlist :0 | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -
docker run -ti -v $HOME/$DATADIR:/root/$DATADIR -v $XSOCK:$XSOCK -v $XAUTH:$XAUTH -e XAUTHORITY=$XAUTH electrum-zcl:latest