2020-12-01 20:45:03 +00:00
|
|
|
FROM ubuntu:20.04
|
|
|
|
|
|
|
|
ARG WITH_COINS
|
|
|
|
ARG WITHOUT_COINS
|
2019-07-17 15:12:06 +00:00
|
|
|
|
2019-07-19 15:33:51 +00:00
|
|
|
ENV LANG=C.UTF-8 \
|
2020-12-01 20:45:03 +00:00
|
|
|
DEBIAN_FRONTEND=noninteractive \
|
2019-07-17 15:12:06 +00:00
|
|
|
DATADIRS="/coindata"
|
|
|
|
|
|
|
|
RUN apt-get update; \
|
2020-12-01 20:45:03 +00:00
|
|
|
apt-get install -y wget python3-pip gnupg unzip protobuf-compiler automake libtool pkg-config;
|
|
|
|
|
|
|
|
RUN wget -O coincurve-anonswap.zip https://github.com/tecnovert/coincurve/archive/anonswap.zip && \
|
|
|
|
unzip coincurve-anonswap.zip && \
|
|
|
|
cd coincurve-anonswap && \
|
|
|
|
python3 setup.py install --force
|
2019-07-17 15:12:06 +00:00
|
|
|
|
2019-07-18 17:53:23 +00:00
|
|
|
# TODO: move coindata dir out of src dir
|
2019-08-02 09:54:32 +00:00
|
|
|
COPY . basicswap-master
|
|
|
|
RUN 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
|
2020-12-01 20:45:03 +00:00
|
|
|
RUN basicswap-prepare -datadir=/opt -preparebinonly ${WITH_COINS} ${WITHOUT_COINS}
|
2019-07-25 11:41:33 +00:00
|
|
|
|
2019-07-25 15:47:24 +00:00
|
|
|
RUN useradd -ms /bin/bash user && \
|
|
|
|
mkdir /coindata && chown user -R /coindata
|
2019-07-17 15:12:06 +00:00
|
|
|
|
|
|
|
USER user
|
|
|
|
WORKDIR /home/user
|
|
|
|
|
|
|
|
# Expose html port
|
|
|
|
EXPOSE 12700
|
|
|
|
|
|
|
|
VOLUME /coindata
|
|
|
|
|
|
|
|
ENTRYPOINT ["basicswap-run", "-datadir=/coindata/basicswap"]
|