mirror of
https://github.com/basicswap/basicswap.git
synced 2025-11-05 10:28:10 +01:00
Simplify docker config.
This commit is contained in:
20
Dockerfile
20
Dockerfile
@@ -1,14 +1,11 @@
|
||||
FROM ubuntu:20.04
|
||||
|
||||
ARG WITH_COINS
|
||||
ARG WITHOUT_COINS
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
DATADIRS="/coindata"
|
||||
|
||||
RUN apt-get update; \
|
||||
apt-get install -y wget python3-pip gnupg unzip protobuf-compiler automake libtool pkg-config;
|
||||
apt-get install -y wget python3-pip gnupg unzip protobuf-compiler automake libtool pkg-config gosu;
|
||||
|
||||
RUN wget -O coincurve-anonswap.zip https://github.com/tecnovert/coincurve/archive/anonswap.zip && \
|
||||
unzip coincurve-anonswap.zip && \
|
||||
@@ -21,18 +18,15 @@ RUN cd basicswap-master; \
|
||||
protoc -I=basicswap --python_out=basicswap basicswap/messages.proto; \
|
||||
pip3 install .;
|
||||
|
||||
# Download binaries, these will be part of the docker image
|
||||
RUN basicswap-prepare -datadir=/opt -preparebinonly ${WITH_COINS} ${WITHOUT_COINS}
|
||||
|
||||
RUN useradd -ms /bin/bash user && \
|
||||
mkdir /coindata && chown user -R /coindata
|
||||
|
||||
USER user
|
||||
WORKDIR /home/user
|
||||
RUN useradd -ms /bin/bash swap_user && \
|
||||
mkdir /coindata && chown swap_user -R /coindata
|
||||
|
||||
# Expose html port
|
||||
EXPOSE 12700
|
||||
|
||||
VOLUME /coindata
|
||||
|
||||
ENTRYPOINT ["basicswap-run", "-datadir=/coindata/basicswap"]
|
||||
COPY ./docker/entrypoint.sh /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["basicswap-run", "-datadir=/coindata/basicswap"]
|
||||
|
||||
Reference in New Issue
Block a user