-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't base monerod image on sethforprivacy/simple-monerod-docker
- Loading branch information
Showing
3 changed files
with
49 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,59 @@ | ||
# https://github.com/sethforprivacy/simple-monerod-docker | ||
# https://hub.docker.com/r/sethsimmons/simple-monerod/tags | ||
FROM sethsimmons/simple-monerod:v0.18.3.1 | ||
FROM debian:12-slim as base | ||
|
||
ENV NAME=monero | ||
ENV VERSION=v0.18.3.1 | ||
ENV TARBALL=$NAME-linux-x64-$VERSION.tar.bz2 | ||
ENV DOWNLOAD=https://downloads.getmonero.org/cli | ||
ENV HASH=23af572fdfe3459b9ab97e2e9aa7e3c11021c955d6064b801a27d7e8c21ae09d | ||
|
||
RUN set -eux \ | ||
\ | ||
&& apt-get -y update \ | ||
&& apt-get -y upgrade \ | ||
&& apt-get -y install curl bzip2 \ | ||
&& apt-get -y clean \ | ||
&& rm -rf /var/lib/apt | ||
|
||
FROM base as builder | ||
RUN set -eux \ | ||
\ | ||
&& curl -Lo $TARBALL $DOWNLOAD/$TARBALL \ | ||
&& sha256sum $TARBALL \ | ||
&& echo "$HASH $TARBALL" > SHA256SUMS \ | ||
&& sha256sum -c SHA256SUMS \ | ||
&& tar xf $TARBALL \ | ||
&& rm $TARBALL \ | ||
&& mv /$NAME-* /$NAME | ||
|
||
FROM base | ||
COPY --from=builder /$NAME/$NAME* /usr/bin/ | ||
|
||
ARG m_USER=monerod | ||
ARG m_UID=801 | ||
ARG m_GID=$m_UID | ||
ARG m_HOME=/nonexistent | ||
ARG m_SHELL=/usr/sbin/nologin | ||
|
||
USER root | ||
WORKDIR / | ||
RUN set -eux \ | ||
\ | ||
&& sed -i "s/fixuid -q//" /entrypoint.sh \ | ||
&& rm -f /usr/local/bin/fixuid \ | ||
&& chown 0:0 /usr/local/bin/monerod \ | ||
&& mv /usr/local/bin/monerod /usr/bin \ | ||
&& deluser --remove-home monero \ | ||
&& addgroup -S -g $m_GID $m_USER \ | ||
&& adduser -h $m_HOME -s $m_SHELL -G $m_USER -u $m_UID -D -g "" $m_USER \ | ||
&& addgroup --system --gid $m_GID $m_USER \ | ||
&& adduser --system --uid $m_UID --gid $m_GID --disabled-password $m_USER \ | ||
&& mkdir -m 0700 /srv/monerod \ | ||
&& chown $m_UID:$m_GID /srv/monerod | ||
|
||
VOLUME /srv/monerod | ||
|
||
USER $m_USER:$m_USER | ||
|
||
CMD ["--data-dir", "/srv/monerod", \ | ||
"--log-level", "0",\ | ||
"--rpc-bind-ip", "0.0.0.0", "--confirm-external-bind", \ | ||
"--zmq-pub", "tcp://0.0.0.0:18083", \ | ||
HEALTHCHECK --interval=30s --timeout=5s CMD curl --fail http://localhost:18081/get_info || exit 1 | ||
|
||
ENTRYPOINT ["monerod"] | ||
CMD ["--non-interactive", \ | ||
"--data-dir=/srv/monerod", \ | ||
"--log-level=0", \ | ||
"--rpc-bind-ip=0.0.0.0", "--confirm-external-bind", \ | ||
"--zmq-pub=tcp://0.0.0.0:18083", \ | ||
"--no-igd", \ | ||
"--out-peers", "16", "--in-peers", "8", \ | ||
"--disable-dns-checkpoints"] | ||
"--out-peers=8", "--in-peers=16", \ | ||
"--add-priority-node=p2pmd.xmrvsbeast.com:18080", \ | ||
"--add-priority-node=nodes.hashvault.pro:18080", \ | ||
"--disable-dns-checkpoints", \ | ||
"--enable-dns-blocklist"] |