main
Ricard Illa 2021-05-18 15:48:49 +02:00
parent b890e22d0d
commit 90b63fda82
2 changed files with 50 additions and 0 deletions

31
monero/Dockerfile Normal file
View File

@ -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

19
monero/Makefile Normal file
View File

@ -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) .