Skip to content

Instantly share code, notes, and snippets.

@mdPlusPlus
Created August 19, 2022 15:32
Show Gist options
  • Save mdPlusPlus/f49bd9a9149fc859555b7778b0461db2 to your computer and use it in GitHub Desktop.
Save mdPlusPlus/f49bd9a9149fc859555b7778b0461db2 to your computer and use it in GitHub Desktop.
Dockerfile for monerod (https://www.getmonero.org/)
FROM ubuntu:focal
LABEL "author"="mdPlusPlus"
LABEL "name"="monerod"
LABEL "description"="Dockerfile for monerod (https://www.getmonero.org/)"
EXPOSE 18081/tcp
VOLUME ["/root/.bitmonero"]
RUN \
cd ~ && \
apt update && \
apt install -y gpg wget && \
gpg --keyserver hkps://keyserver.ubuntu.com --receive-keys 81AC591FE9C4B65C5806AFC3F0AF4D462A0BDF92 && \
wget -q https://www.getmonero.org/downloads/hashes.txt && \
gpg --verify hashes.txt && \
wget -q --content-disposition https://downloads.getmonero.org/cli/linux64 && \
sha256sum --ignore-missing --check hashes.txt && \
tar xf monero-linux-x64-v*.tar.bz2 && \
rm hashes.txt monero-linux-x64-v*.tar.bz2 && \
apt purge -y gpg wget && \
apt autoremove --purge -y && \
apt clean && \
mkdir certs && \
cd certs && \
../monero-x86_64-linux-gnu-v*/monero-gen-ssl-cert --certificate-filename cert --private-key-filename priv && \
cd .. && \
ln -s /root/monero-x86_64-linux-gnu-v*/monerod /root/monerod
CMD ["/root/monerod", "--non-interactive", "--no-zmq", "--no-igd", "--enforce-dns-checkpointing", "--restricted-rpc", "--rpc-ssl-private-key", "/root/certs/priv", "--rpc-ssl-certificate", "/root/certs/cert", "--rpc-ssl", "enabled"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment