-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
78 lines (62 loc) · 2.28 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
ARG VERSION=v0.8.0
ARG REPO=https://github.com/JoinMarket-Org/joinmarket-clientserver
ARG USER=joinmarket
ARG DIR=/data/
FROM python:3.8.5-slim-buster AS final
LABEL maintainer="nolim1t ([email protected])"
ARG VERSION
ARG REPO
# Setup dependencies
RUN apt-get update && apt-get install -y --no-install-recommends python3-dev python3-pip git build-essential automake pkg-config libtool libffi-dev libssl-dev libgmp-dev libsodium-dev pwgen &&
apt-get clean &&
rm -rf /var/lib/apt/lists/*
WORKDIR /
RUN git clone https://github.com/bitcoin-core/secp256k1.git
RUN git clone $REPO
# Build secp256k1
WORKDIR /secp256k1
RUN ./autogen.sh
RUN ./configure
RUN make
RUN make install
# Copy from base dir
# namely genwallet.py which doesn't exist yet
COPY ./bins/genwallet.py /usr/local/bin
COPY ./bins/recover.py /usr/local/bin
# Entrypoint for joinmarket
COPY ./bins/jm-entrypoint.sh /usr/local/bin
# Joinmarket root
WORKDIR /joinmarket-clientserver
# If version is not master then checkout a different branch
RUN git checkout $VERSION
# Copy some useful utils into /usr/local/bin
RUN cp scripts/yg-privacyenhanced.py /usr/local/bin
RUN cp scripts/wallet-tool.py /usr/local/bin
RUN cp scripts/add-utxo.py /usr/local/bin
RUN cp scripts/sendpayment.py /usr/local/bin
RUN cp scripts/sendtomany.py /usr/local/bin
RUN cp scripts/receive-payjoin.py /usr/local/bin
RUN cp scripts/convert_old_wallet.py /usr/local/bin
RUN cp scripts/tumbler.py /usr/local/bin
RUN pip install -r "requirements/base.txt"
ARG USER
ARG DIR
RUN adduser --disabled-password \
--home "$DIR" \
--gecos "" \
"$USER"
USER $USER
RUN mkdir -p $DIR/.joinmarket
# Copy templates to home directory
COPY ./templates/joinmarket.cfg-dist $DIR
WORKDIR $DIR
# Default to joinmarketd
#ENTRYPOINT ["/joinmarket-clientserver/joinmarketd.py", "27183" , "0" , "127.0.0.1"]
ENTRYPOINT ["jm-entrypoint.sh"]