From 90b63fda8253eb9e8854993020eba6ba941ae7ae Mon Sep 17 00:00:00 2001 From: Ricard Illa Date: Tue, 18 May 2021 15:48:49 +0200 Subject: [PATCH] monero --- monero/Dockerfile | 31 +++++++++++++++++++++++++++++++ monero/Makefile | 19 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 monero/Dockerfile create mode 100644 monero/Makefile diff --git a/monero/Dockerfile b/monero/Dockerfile new file mode 100644 index 0000000..2ee560f --- /dev/null +++ b/monero/Dockerfile @@ -0,0 +1,31 @@ +FROM debian:buster-slim + +ENV ARCH x64 +ENV VER v0.17.2.0 +ENV URL "https://downloads.getmonero.org/cli/monero-linux-${ARCH}-${VER}.tar.bz2" + +RUN apt-get update && \ + apt-get install -y curl bzip2 && \ + rm -rf /var/lib/apt/lists/* && \ + curl -o /root/monero.tar.bz2 "${URL}" && \ + bzip2 -d /root/monero.tar.bz2 && \ + tar -C /root -xf /root/monero.tar && \ + find /root -type f -executable -exec cp {} /usr/local/bin \; && \ + rm -r /root/monero* + +RUN groupadd --gid 10001 monero && \ + useradd \ + --uid 10000 \ + --gid 10001 \ + --shell /sbin/nologin \ + --create-home \ + --home-dir /var/lib/monero \ + monero + +USER monero +WORKDIR /var/lib/monero + +# port 18081 +# ~/.bitmonero +# ~/.bitmonero/lmdb -- blockchain dir +# ~/.bitmonero/bitmonero.conf / or --config-file diff --git a/monero/Makefile b/monero/Makefile new file mode 100644 index 0000000..8e0411b --- /dev/null +++ b/monero/Makefile @@ -0,0 +1,19 @@ +USERNAME = rilla +IMG_NAME = monero + +.PHONY: build build-nc + +hw=$(shell uname -m) +ifeq ($(hw), x86_64) + ARCH=x64 +else ifeq ($(hw), aarch64) + ARCH=armv8 +else + ARCH=$(hw) +endif + +build: Dockerfile + docker build -t $(USERNAME)/$(IMG_NAME) --build-arg ARCH=$(ARCH) . + +build-nc: Dockerfile + docker build --no-cache -t $(USERNAME)/$(IMG_NAME) --build-arg ARCH=$(ARCH) .