Add docker-compose.yml and friends

This commit is contained in:
xmrcheckout
2026-01-04 17:57:07 +01:00
parent c92dfd2ef1
commit 5e0ca00af2
8 changed files with 376 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
FROM debian:bookworm-slim
ARG MONERO_VERSION=0.18.4.4
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates curl bzip2 \
&& rm -rf /var/lib/apt/lists/*
RUN set -eux; \
arch="$(dpkg --print-architecture)"; \
if [ "$arch" = "amd64" ]; then \
monero_arch="x64"; \
elif [ "$arch" = "arm64" ]; then \
monero_arch="armv8"; \
else \
echo "Unsupported architecture: $arch" >&2; \
exit 1; \
fi; \
curl -fsSL -o /tmp/monero.tar.bz2 \
"https://downloads.getmonero.org/cli/monero-linux-${monero_arch}-v${MONERO_VERSION}.tar.bz2"; \
tar -xjf /tmp/monero.tar.bz2 -C /tmp; \
cp /tmp/monero-*/monerod /usr/local/bin/; \
cp /tmp/monero-*/monero-wallet-rpc /usr/local/bin/; \
rm -rf /tmp/monero* /tmp/monero.tar.bz2
COPY entrypoint.sh /usr/local/bin/monero-wallet-rpc-entrypoint
RUN chmod +x /usr/local/bin/monero-wallet-rpc-entrypoint
EXPOSE 18081 18083
ENTRYPOINT ["/usr/local/bin/monero-wallet-rpc-entrypoint"]
+42
View File
@@ -0,0 +1,42 @@
#!/bin/sh
set -e
normalize_address() {
value="$1"
if [ -z "$value" ]; then
return
fi
case "$value" in
http://*)
value="${value#http://}"
;;
https://*)
value="${value#https://}"
;;
esac
value="${value%%/*}"
printf '%s' "$value"
}
args=""
while [ "$#" -gt 0 ]; do
case "$1" in
--daemon-address)
shift
normalized="$(normalize_address "$1")"
args="$args --daemon-address $normalized"
;;
--daemon-address=*)
value="${1#--daemon-address=}"
normalized="$(normalize_address "$value")"
args="$args --daemon-address=$normalized"
;;
*)
args="$args $1"
;;
esac
shift
done
# shellcheck disable=SC2086
exec $args