generated from Start9Labs/hello-world-startos
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
37 lines (30 loc) · 1.39 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
FROM ghcr.io/sethforprivacy/simple-monero-wallet-rpc:v0.18.3.4 as monero-wallet-rpc
FROM ghcr.io/sethforprivacy/simple-monerod:v0.18.3.4
COPY --from=monero-wallet-rpc "/usr/local/bin/monero-wallet-rpc" /usr/local/bin/
USER root
RUN apk update
RUN apk --no-cache upgrade
RUN apk --no-cache add curl sudo bash tini yq
# Add entrypoint and healthchecks
ADD ./docker_entrypoint.sh /usr/local/bin/docker_entrypoint.sh
ADD ./scripts/creds-rpc.sh /usr/local/bin/creds-rpc.sh
ADD ./scripts/check-rpc.sh /usr/local/bin/check-rpc.sh
ADD ./scripts/check-sync.sh /usr/local/bin/check-sync.sh
RUN chmod a+x /usr/local/bin/*.sh
#Modify gid & uid of monero user & group:
RUN sed -i "s|^monero:x:1000:1000:Linux User,,,:/home/monero:/bin/bash|monero:x:30234:302340:Monero:/dev/null:/sbin/nologin|" /etc/passwd
RUN sed -i "s|^\(monero:x\):1000:$|\1:302340:|" /etc/group
RUN sed -i "s|^\(monerowallet:x:30235:302340:\)Linux User,,,\(:/dev/null:/sbin/nologin\)|\1Monero Wallet RPC User\2|" /etc/passwd
RUN adduser -h /dev/null -s /sbin/nologin -D -H -u 30235 -G monero monerowallet
# # Add config file for monerod
COPY ./assets/*.conf.template /root/
# # Expose p2p, ZMQ, ZMQ-PUB, and restricted RPC ports to other services' containers
EXPOSE 18080/tcp
#EXPOSE 18081/tcp
EXPOSE 18082/tcp
EXPOSE 18083/tcp
EXPOSE 18089/tcp
EXPOSE 28088/tcp
WORKDIR "/data/.bitmonero"
# Start monerod
ENTRYPOINT ["/usr/local/bin/docker_entrypoint.sh"]