basicswap/docker/production/swapclient/Dockerfile

50 lines
1.6 KiB
Text
Raw Normal View History

FROM debian:bullseye-slim
2020-12-27 19:39:10 +00:00
ENV LANG=C.UTF-8 \
DEBIAN_FRONTEND=noninteractive \
DATADIR=/data
RUN apt-get update; \
apt-get install -y wget python3-pip gnupg unzip make g++ autoconf automake libtool pkg-config gosu tzdata;
# Must install protoc directly as latest package is not up to date
RUN wget -O protobuf_src.tar.gz https://github.com/protocolbuffers/protobuf/releases/download/v21.1/protobuf-python-4.21.1.tar.gz && \
tar xvf protobuf_src.tar.gz && \
cd protobuf-3.21.1 && \
./configure --prefix=/usr && \
make -j$(nproc) install && \
ldconfig
2020-12-27 19:39:10 +00:00
ARG COINCURVE_VERSION=v0.1
RUN wget -O coincurve-anonswap.zip https://github.com/tecnovert/coincurve/archive/refs/tags/anonswap_$COINCURVE_VERSION.zip && \
unzip coincurve-anonswap.zip && \
mv ./coincurve-anonswap_$COINCURVE_VERSION ./coincurve-anonswap && \
2020-12-27 19:39:10 +00:00
cd coincurve-anonswap && \
python3 setup.py install --force
2023-02-15 09:33:18 +00:00
ARG BASICSWAP_URL=https://github.com/tecnovert/basicswap/archive/master.zip
ARG BASICSWAP_DIR=basicswap-master
RUN wget -O basicswap-repo.zip $BASICSWAP_URL; \
unzip basicswap-repo.zip; \
cd $BASICSWAP_DIR; \
2020-12-27 19:39:10 +00:00
protoc -I=basicswap --python_out=basicswap basicswap/messages.proto; \
pip3 install .;
#COPY ./test_code basicswap-master
#RUN cd basicswap-master; \
# protoc -I=basicswap --python_out=basicswap basicswap/messages.proto; \
# pip3 install .;
RUN groupadd -r swap_user && useradd -g swap_user -ms /bin/bash swap_user && \
2020-12-27 19:39:10 +00:00
mkdir /data && chown swap_user -R /data
# Expose html port
EXPOSE 12700
VOLUME /data
COPY ./entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["basicswap-run", "-datadir=/data"]