2019-07-17 15:12:06 +00:00
|
|
|
FROM ubuntu:18.10
|
|
|
|
|
2019-07-19 15:33:51 +00:00
|
|
|
ENV LANG=C.UTF-8 \
|
2019-07-17 15:12:06 +00:00
|
|
|
DATADIRS="/coindata"
|
|
|
|
|
|
|
|
RUN apt-get update; \
|
2019-07-25 11:41:33 +00:00
|
|
|
apt-get install -y wget python3-pip gnupg unzip protobuf-compiler;
|
2019-07-17 15:12:06 +00:00
|
|
|
|
2019-07-18 17:53:23 +00:00
|
|
|
# TODO: move coindata dir out of src dir
|
|
|
|
RUN wget -O bs.zip https://github.com/tecnovert/basicswap/archive/master.zip; \
|
|
|
|
unzip bs.zip; \
|
|
|
|
cd basicswap-master; \
|
2019-07-17 15:12:06 +00:00
|
|
|
protoc -I=basicswap --python_out=basicswap basicswap/messages.proto; \
|
|
|
|
pip3 install .;
|
|
|
|
|
2019-07-25 11:41:33 +00:00
|
|
|
# Download binaries, these will be part of the docker image
|
2019-07-25 12:06:58 +00:00
|
|
|
RUN basicswap-prepare -datadir=/opt -preparebinonly
|
2019-07-25 11:41:33 +00:00
|
|
|
|
2019-07-17 15:12:06 +00:00
|
|
|
RUN useradd -ms /bin/bash user; \
|
|
|
|
mkdir /coindata && chown user /coindata
|
|
|
|
|
|
|
|
USER user
|
|
|
|
WORKDIR /home/user
|
|
|
|
|
|
|
|
# Expose html port
|
|
|
|
EXPOSE 12700
|
|
|
|
|
|
|
|
VOLUME /coindata
|
|
|
|
|
|
|
|
ENTRYPOINT ["basicswap-run", "-datadir=/coindata/basicswap"]
|