This commit is contained in:
Andrew Camilleri (Kukks) 2025-06-27 15:27:20 +02:00
commit 9b761054fc
No known key found for this signature in database
GPG Key ID: 8E5530D9D1C93097
16 changed files with 855 additions and 0 deletions

View File

@ -0,0 +1,73 @@
#!/bin/bash
set -e
if [[ "$1" == "elements-cli" || "$1" == "elements-tx" || "$1" == "elementsd" || "$1" == "test_elements" ]]; then
mkdir -p "$ELEMENTS_DATA"
CONFIG_PREFIX=""
CHAIN="$ELEMENTS_CHAIN"
NL=$'\n'
if [[ "$CHAIN" ]]; then
CONFIG_PREFIX="chain=$CHAIN\n[$CHAIN]"
elif [[ "${ELEMENTS_NETWORK}" == "regtest" ]]; then
CHAIN="${ELEMENTS_REGTEST_CHAIN:-regtest}"
elif [[ "${ELEMENTS_NETWORK}" == "testnet" ]]; then
CHAIN="${ELEMENTS_TESTNET_CHAIN:-testnet}"
elif [[ "${ELEMENTS_NETWORK}" == "mainnet" ]]; then
CHAIN="${ELEMENTS_MAINNET_CHAIN:-liquidv1}"
else
CHAIN=""
fi
if [[ "$CHAIN" ]]; then
CONFIG_PREFIX="chain=${CHAIN}${NL}[${CHAIN}]"
fi
if [[ "$ELEMENTS_WALLETDIR" ]] && [[ "$CHAIN" ]]; then
WALLETDIR="$ELEMENTS_WALLETDIR/${CHAIN}"
mkdir -p "$WALLETDIR"
[[ -f "${WALLETDIR}/db.log" ]] && mkdir -p "${WALLETDIR}/${CHAIN}/wallets" && mv "${WALLETDIR}/db.log" "${WALLETDIR}/${CHAIN}/wallets/db.log"
[[ -f "${WALLETDIR}/wallet.dat" ]] && mkdir -p "${WALLETDIR}/${CHAIN}/wallets" && mv "${WALLETDIR}/wallet.dat" "${WALLETDIR}/${CHAIN}/wallets/wallet.dat"
[[ -d "${WALLETDIR}/database" ]] && mkdir -p "${WALLETDIR}/${CHAIN}/wallets" && mv "${WALLETDIR}/database" "${WALLETDIR}/${CHAIN}/wallets/database"
chown -R elements:elements "$WALLETDIR"
CONFIG_PREFIX="${CONFIG_PREFIX}${NL}walletdir=${WALLETDIR}/${CHAIN}/wallets${NL}"
WALLETFILE="${WALLETDIR}/${CHAIN}/wallets/wallet.dat"
if ! [[ -f "${WALLETFILE}" ]]; then
echo "The wallet does not exists, creating it at ${WALLETDIR}..."
gosu elements elements-wallet "-datadir=${WALLETDIR}" "-wallet=" create
fi
fi
cat <<-EOF > "$ELEMENTS_DATA/elements.conf"
${CONFIG_PREFIX}
printtoconsole=1
rpcallowip=::/0
${ELEMENTS_EXTRA_ARGS}
EOF
chown elements:elements "$ELEMENTS_DATA/elements.conf"
if [[ "${ELEMENTS_TORCONTROL}" ]]; then
# Because elementsd only accept torcontrol= host as an ip only, we resolve it here and add to config
TOR_CONTROL_HOST=$(echo ${ELEMENTS_TORCONTROL} | cut -d ':' -f 1)
TOR_CONTROL_PORT=$(echo ${ELEMENTS_TORCONTROL} | cut -d ':' -f 2)
if [[ "$TOR_CONTROL_HOST" ]] && [[ "$TOR_CONTROL_PORT" ]]; then
TOR_IP=$(getent hosts $TOR_CONTROL_HOST | cut -d ' ' -f 1)
echo "torcontrol=$TOR_IP:$TOR_CONTROL_PORT" >> "$ELEMENTS_DATA/elements.conf"
echo "Added "torcontrol=$TOR_IP:$TOR_CONTROL_PORT" to $ELEMENTS_DATA/elements.conf"
else
echo "Invalid ELEMENTS_TORCONTROL"
fi
fi
# ensure correct ownership and linking of data directory
# we do not update group ownership here, in case users want to mount
# a host directory and still retain access to it
chown -R elements "$ELEMENTS_DATA"
ln -sfn "$ELEMENTS_DATA" /home/elements/.elements
chown -h elements:elements /home/elements/.elements
exec gosu elements "$@"
else
exec "$@"
fi

View File

@ -0,0 +1,40 @@
FROM debian:buster-slim as builder
RUN set -ex \
&& apt-get update \
&& apt-get install -qq --no-install-recommends ca-certificates dirmngr gosu wget
ENV ELEMENTS_VERSION 23.2.4
ENV ELEMENTS_URL https://github.com/ElementsProject/elements/releases/download/elements-23.2.4/elements-23.2.4-x86_64-linux-gnu.tar.gz
ENV ELEMENTS_SHA256 6e0c747ec4ba4e54eb3426e7219354b5ea150b393a4e2b8a536cab64a5d9c7a8
# install elements binaries
RUN set -ex \
&& cd /tmp \
&& wget -qO elements.tar.gz "$ELEMENTS_URL" \
&& echo "$ELEMENTS_SHA256 elements.tar.gz" | sha256sum -c - \
&& mkdir bin \
&& tar -xzvf elements.tar.gz -C /tmp/bin --strip-components=2 "elements-$ELEMENTS_VERSION/bin/elements-cli" "elements-$ELEMENTS_VERSION/bin/elementsd" "elements-$ELEMENTS_VERSION/bin/elements-wallet" \
&& cd bin \
&& wget -qO gosu "https://github.com/tianon/gosu/releases/download/1.17/gosu-amd64" \
&& echo "bbc4136d03ab138b1ad66fa4fc051bafc6cc7ffae632b069a53657279a450de3 gosu" | sha256sum -c -
FROM debian:buster-slim
COPY --from=builder "/tmp/bin" /usr/local/bin
RUN chmod +x /usr/local/bin/gosu && groupadd -r elements && useradd -r -m -g elements elements
# create data directory
ENV ELEMENTS_DATA /data
RUN mkdir "$ELEMENTS_DATA" \
&& chown -R elements:elements "$ELEMENTS_DATA" \
&& ln -sfn "$ELEMENTS_DATA" /home/elements/.elements \
&& chown -h elements:elements /home/elements/.elements
VOLUME /data
COPY docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["bash", "/entrypoint.sh"]
EXPOSE 8332 8333 18332 18333 18443 18444
CMD ["elementsd"]

View File

@ -0,0 +1,44 @@
# Use manifest image which support all architecture
FROM debian:buster-slim as builder
RUN set -ex \
&& apt-get update \
&& apt-get install -qq --no-install-recommends ca-certificates dirmngr gosu wget
ENV ELEMENTS_VERSION 23.2.4
ENV ELEMENTS_URL https://github.com/ElementsProject/elements/releases/download/elements-23.2.4/elements-23.2.4-arm-linux-gnueabihf.tar.gz
ENV ELEMENTS_SHA256 17108a12960d481b2fd505908ce038693844e34bc66e8d06d1369978e286018e
# install elements binaries
RUN set -ex \
&& cd /tmp \
&& wget -qO elements.tar.gz "$ELEMENTS_URL" \
&& echo "$ELEMENTS_SHA256 elements.tar.gz" | sha256sum -c - \
&& mkdir bin \
&& tar -xzvf elements.tar.gz -C /tmp/bin --strip-components=2 "elements-$ELEMENTS_VERSION/bin/elements-cli" "elements-$ELEMENTS_VERSION/bin/elementsd" "elements-$ELEMENTS_VERSION/bin/elements-wallet" \
&& cd bin \
&& wget -qO gosu "https://github.com/tianon/gosu/releases/download/1.17/gosu-armhf" \
&& echo "e5866286277ff2a2159fb9196fea13e0a59d3f1091ea46ddb985160b94b6841b gosu" | sha256sum -c -
# Making sure the builder build an arm image despite being x64
FROM arm32v7/debian:buster-slim
COPY --from=builder "/tmp/bin" /usr/local/bin
#EnableQEMU COPY qemu-arm-static /usr/bin
RUN chmod +x /usr/local/bin/gosu && groupadd -r elements && useradd -r -m -g elements elements
# create data directory
ENV ELEMENTS_DATA /data
RUN mkdir "$ELEMENTS_DATA" \
&& chown -R elements:elements "$ELEMENTS_DATA" \
&& ln -sfn "$ELEMENTS_DATA" /home/elements/.elements \
&& chown -h elements:elements /home/elements/.elements
VOLUME /data
COPY docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["bash", "/entrypoint.sh"]
EXPOSE 8332 8333 18332 18333 18443 18444
CMD ["elementsd"]

View File

@ -0,0 +1,44 @@
# Use manifest image which support all architecture
FROM debian:buster-slim as builder
RUN set -ex \
&& apt-get update \
&& apt-get install -qq --no-install-recommends ca-certificates dirmngr gosu wget
ENV ELEMENTS_VERSION 23.2.4
ENV ELEMENTS_URL https://github.com/ElementsProject/elements/releases/download/elements-23.2.4/elements-23.2.4-aarch64-linux-gnu.tar.gz
ENV ELEMENTS_SHA256 5c6f8219fd1baf4d4c2b05b6dd9ec71bb348754bd46aeb3faa7ba0ba69aff0e8
# install elements binaries
RUN set -ex \
&& cd /tmp \
&& wget -qO elements.tar.gz "$ELEMENTS_URL" \
&& echo "$ELEMENTS_SHA256 elements.tar.gz" | sha256sum -c - \
&& mkdir bin \
&& tar -xzvf elements.tar.gz -C /tmp/bin --strip-components=2 "elements-$ELEMENTS_VERSION/bin/elements-cli" "elements-$ELEMENTS_VERSION/bin/elementsd" "elements-$ELEMENTS_VERSION/bin/elements-wallet" \
&& cd bin \
&& wget -qO gosu "https://github.com/tianon/gosu/releases/download/1.17/gosu-arm64" \
&& echo "c3805a85d17f4454c23d7059bcb97e1ec1af272b90126e79ed002342de08389b gosu" | sha256sum -c -
# Making sure the builder build an arm image despite being x64
FROM arm64v8/debian:buster-slim
COPY --from=builder "/tmp/bin" /usr/local/bin
#EnableQEMU COPY qemu-aarch64-static /usr/bin
RUN chmod +x /usr/local/bin/gosu && groupadd -r elements && useradd -r -m -g elements elements
# create data directory
ENV ELEMENTS_DATA /data
RUN mkdir "$ELEMENTS_DATA" \
&& chown -R elements:elements "$ELEMENTS_DATA" \
&& ln -sfn "$ELEMENTS_DATA" /home/elements/.elements \
&& chown -h elements:elements /home/elements/.elements
VOLUME /data
COPY docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["bash", "/entrypoint.sh"]
EXPOSE 8332 8333 18332 18333 18443 18444
CMD ["elementsd"]

View File

@ -0,0 +1,67 @@
#!/bin/bash
set -e
if [[ "$1" == "groestlcoin-cli" || "$1" == "groestlcoin-tx" || "$1" == "groestlcoind" || "$1" == "test_groestlcoin" ]]; then
mkdir -p "$GROESTLCOIN_DATA"
CONFIG_PREFIX=""
if [[ "${GROESTLCOIN_NETWORK}" == "regtest" ]]; then
CONFIG_PREFIX=$'regtest=1\n[regtest]'
elif [[ "${GROESTLCOIN_NETWORK}" == "testnet" ]]; then
CONFIG_PREFIX=$'testnet=1\n[test]'
elif [[ "${GROESTLCOIN_NETWORK}" == "mainnet" ]]; then
CONFIG_PREFIX=$'mainnet=1\n[main]'
elif [[ "${GROESTLCOIN_NETWORK}" == "signet" ]]; then
CONFIG_PREFIX=$'signet=1\n[signet]'
else
GROESTLCOIN_NETWORK="mainnet"
CONFIG_PREFIX=$'mainnet=1\n[main]'
fi
if [[ "$GROESTLCOIN_WALLETDIR" ]] && [[ "$GROESTLCOIN_NETWORK" ]]; then
NL=$'\n'
WALLETDIR="$GROESTLCOIN_WALLETDIR/${GROESTLCOIN_NETWORK}"
WALLETFILE="${WALLETDIR}/wallet.dat"
mkdir -p "$WALLETDIR"
chown -R groestlcoin:groestlcoin "$WALLETDIR"
CONFIG_PREFIX="${CONFIG_PREFIX}${NL}walletdir=${WALLETDIR}${NL}"
: "${CREATE_WALLET:=true}"
if ! [[ -f "${WALLETFILE}" ]] && [[ "${CREATE_WALLET}" != "false" ]]; then
echo "The wallet does not exists, creating it at ${WALLETDIR}..."
gosu groestlcoin groestlcoin-wallet "-datadir=${WALLETDIR}" "-legacy" "-wallet=" create
fi
fi
cat <<-EOF > "$GROESTLCOIN_DATA/groestlcoin.conf"
${CONFIG_PREFIX}
printtoconsole=1
rpcallowip=::/0
${GROESTLCOIN_EXTRA_ARGS}
EOF
chown groestlcoin:groestlcoin "$GROESTLCOIN_DATA/groestlcoin.conf"
if [[ "${GROESTLCOIN_TORCONTROL}" ]]; then
# Because groestlcoind only accept torcontrol= host as an ip only, we resolve it here and add to config
TOR_CONTROL_HOST=$(echo ${GROESTLCOIN_TORCONTROL} | cut -d ':' -f 1)
TOR_CONTROL_PORT=$(echo ${GROESTLCOIN_TORCONTROL} | cut -d ':' -f 2)
if [[ "$TOR_CONTROL_HOST" ]] && [[ "$TOR_CONTROL_PORT" ]]; then
TOR_IP=$(getent hosts $TOR_CONTROL_HOST | cut -d ' ' -f 1)
echo "torcontrol=$TOR_IP:$TOR_CONTROL_PORT" >> "$GROESTLCOIN_DATA/groestlcoin.conf"
echo "Added "torcontrol=$TOR_IP:$TOR_CONTROL_PORT" to $GROESTLCOIN_DATA/groestlcoin.conf"
else
echo "Invalid GROESTLCOIN_TORCONTROL"
fi
fi
# ensure correct ownership and linking of data directory
# we do not update group ownership here, in case users want to mount
# a host directory and still retain access to it
chown -R groestlcoin "$GROESTLCOIN_DATA"
ln -sfn "$GROESTLCOIN_DATA" /home/groestlcoin/.groestlcoin
chown -h groestlcoin:groestlcoin /home/groestlcoin/.groestlcoin
rm -f /home/groestlcoin/.groestlcoin/settings.json
exec gosu groestlcoin "$@"
else
exec "$@"
fi

View File

@ -0,0 +1,47 @@
FROM debian:bookworm-slim as builder
RUN set -ex \
&& apt-get update \
&& apt-get install -qq --no-install-recommends ca-certificates dirmngr gosu wget
ENV GROESTLCOIN_VERSION 27.0
ENV GROESTLCOIN_TARBALL groestlcoin-${GROESTLCOIN_VERSION}-x86_64-linux-gnu.tar.gz
ENV GROESTLCOIN_URL https://github.com/Groestlcoin/groestlcoin/releases/download/v$GROESTLCOIN_VERSION/$GROESTLCOIN_TARBALL
ENV GROESTLCOIN_SHA256 5189f036913e2033b5fe95ba8f3fc027e9c5bd286d2150e9133cd4a2fd69a7a0
# install groestlcoin binaries
RUN set -ex \
&& cd /tmp \
&& wget -qO $GROESTLCOIN_TARBALL "$GROESTLCOIN_URL" \
&& echo "$GROESTLCOIN_SHA256 $GROESTLCOIN_TARBALL" | sha256sum -c - \
&& mkdir bin \
&& tar -xzvf $GROESTLCOIN_TARBALL -C /tmp/bin --strip-components=2 "groestlcoin-$GROESTLCOIN_VERSION/bin/groestlcoin-cli" "groestlcoin-$GROESTLCOIN_VERSION/bin/groestlcoind" "groestlcoin-$GROESTLCOIN_VERSION/bin/groestlcoin-wallet" \
&& cd bin \
&& wget -qO gosu "https://github.com/tianon/gosu/releases/download/1.16/gosu-amd64" \
&& echo "3a4e1fc7430f9e7dd7b0cbbe0bfde26bf4a250702e84cf48a1eb2b631c64cf13 gosu" | sha256sum -c -
FROM debian:bookworm-slim
COPY --from=builder "/tmp/bin" /usr/local/bin
ARG GROESTLCOIN_USER_ID=999
ARG GROESTLCOIN_GROUP_ID=999
RUN apt-get update && \
apt-get install -qq --no-install-recommends xxd && \
rm -rf /var/lib/apt/lists/*
RUN chmod +x /usr/local/bin/gosu && groupadd -r -g $GROESTLCOIN_GROUP_ID groestlcoin && useradd -r -m -u $GROESTLCOIN_USER_ID -g groestlcoin groestlcoin
# create data directory
ENV GROESTLCOIN_DATA /data
RUN mkdir "$GROESTLCOIN_DATA" \
&& chown -R groestlcoin:groestlcoin "$GROESTLCOIN_DATA" \
&& ln -sfn "$GROESTLCOIN_DATA" /home/groestlcoin/.groestlcoin \
&& chown -h groestlcoin:groestlcoin /home/groestlcoin/.groestlcoin
VOLUME /data
COPY docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 1331 1441 17777 17766 18888 18443 31331 31441
CMD ["groestlcoind"]

View File

@ -0,0 +1,52 @@
# Use manifest image which support all architecture
FROM debian:bookworm-slim as builder
RUN set -ex \
&& apt-get update \
&& apt-get install -qq --no-install-recommends ca-certificates dirmngr gosu wget
RUN apt-get install -qq --no-install-recommends qemu-user-static binfmt-support
ENV GROESTLCOIN_VERSION 27.0
ENV GROESTLCOIN_TARBALL groestlcoin-${GROESTLCOIN_VERSION}-arm-linux-gnueabihf.tar.gz
ENV GROESTLCOIN_URL https://github.com/Groestlcoin/groestlcoin/releases/download/v$GROESTLCOIN_VERSION/$GROESTLCOIN_TARBALL
ENV GROESTLCOIN_SHA256 61e29509efcd63e5acc666d0ed2d197d0448345549df168b0011f04d3081b760
# install groestlcoin binaries
RUN set -ex \
&& cd /tmp \
&& wget -qO $GROESTLCOIN_TARBALL "$GROESTLCOIN_URL" \
&& echo "$GROESTLCOIN_SHA256 $GROESTLCOIN_TARBALL" | sha256sum -c - \
&& mkdir bin \
&& tar -xzvf $GROESTLCOIN_TARBALL -C /tmp/bin --strip-components=2 "groestlcoin-$GROESTLCOIN_VERSION/bin/groestlcoin-cli" "groestlcoin-$GROESTLCOIN_VERSION/bin/groestlcoind" "groestlcoin-$GROESTLCOIN_VERSION/bin/groestlcoin-wallet" \
&& cd bin \
&& wget -qO gosu "https://github.com/tianon/gosu/releases/download/1.16/gosu-armhf" \
&& echo "1b670d5426e1ddbb14a14280afb6850a48c219189d4cfe7e6eb2cc08a4fc7785 gosu" | sha256sum -c -
# Making sure the builder build an arm image despite being x64
FROM arm32v7/debian:bookworm-slim
COPY --from=builder "/tmp/bin" /usr/local/bin
COPY --from=builder /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static
ARG GROESTLCOIN_USER_ID=999
ARG GROESTLCOIN_GROUP_ID=999
RUN apt-get update && \
apt-get install -qq --no-install-recommends xxd && \
rm -rf /var/lib/apt/lists/*
RUN chmod +x /usr/local/bin/gosu && groupadd -r -g $GROESTLCOIN_GROUP_ID groestlcoin && useradd -r -m -u $GROESTLCOIN_USER_ID -g groestlcoin groestlcoin
# create data directory
ENV GROESTLCOIN_DATA /data
RUN mkdir "$GROESTLCOIN_DATA" \
&& chown -R groestlcoin:groestlcoin "$GROESTLCOIN_DATA" \
&& ln -sfn "$GROESTLCOIN_DATA" /home/groestlcoin/.groestlcoin \
&& chown -h groestlcoin:groestlcoin /home/groestlcoin/.groestlcoin
VOLUME /data
COPY docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 1331 1441 17777 17766 18888 18443 31331 31441
CMD ["groestlcoind"]

View File

@ -0,0 +1,52 @@
# Use manifest image which support all architecture
FROM debian:bookworm-slim as builder
RUN set -ex \
&& apt-get update \
&& apt-get install -qq --no-install-recommends ca-certificates dirmngr gosu wget
RUN apt-get install -qq --no-install-recommends qemu-user-static binfmt-support
ENV GROESTLCOIN_VERSION 27.0
ENV GROESTLCOIN_TARBALL groestlcoin-${GROESTLCOIN_VERSION}-aarch64-linux-gnu.tar.gz
ENV GROESTLCOIN_URL https://github.com/Groestlcoin/groestlcoin/releases/download/v$GROESTLCOIN_VERSION/$GROESTLCOIN_TARBALL
ENV GROESTLCOIN_SHA256 95e1a4c4f4d50709df40e2d86c4b578db053d1cb475a3384862192c1298f9de6
# install groestlcoin binaries
RUN set -ex \
&& cd /tmp \
&& wget -qO $GROESTLCOIN_TARBALL "$GROESTLCOIN_URL" \
&& echo "$GROESTLCOIN_SHA256 $GROESTLCOIN_TARBALL" | sha256sum -c - \
&& mkdir bin \
&& tar -xzvf $GROESTLCOIN_TARBALL -C /tmp/bin --strip-components=2 "groestlcoin-$GROESTLCOIN_VERSION/bin/groestlcoin-cli" "groestlcoin-$GROESTLCOIN_VERSION/bin/groestlcoind" "groestlcoin-$GROESTLCOIN_VERSION/bin/groestlcoin-wallet" \
&& cd bin \
&& wget -qO gosu "https://github.com/tianon/gosu/releases/download/1.16/gosu-arm64" \
&& echo "23fa49907d5246d2e257de3bf883f57fba47fe1f559f7e732ff16c0f23d2b6a6 gosu" | sha256sum -c -
# Making sure the builder build an arm image despite being x64
FROM arm64v8/debian:bookworm-slim
COPY --from=builder "/tmp/bin" /usr/local/bin
COPY --from=builder /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static
ARG GROESTLCOIN_USER_ID=999
ARG GROESTLCOIN_GROUP_ID=999
RUN apt-get update && \
apt-get install -qq --no-install-recommends xxd && \
rm -rf /var/lib/apt/lists/*
RUN chmod +x /usr/local/bin/gosu && groupadd -r -g $GROESTLCOIN_GROUP_ID groestlcoin && useradd -r -m -u $GROESTLCOIN_USER_ID -g groestlcoin groestlcoin
# create data directory
ENV GROESTLCOIN_DATA /data
RUN mkdir "$GROESTLCOIN_DATA" \
&& chown -R groestlcoin:groestlcoin "$GROESTLCOIN_DATA" \
&& ln -sfn "$GROESTLCOIN_DATA" /home/groestlcoin/.groestlcoin \
&& chown -h groestlcoin:groestlcoin /home/groestlcoin/.groestlcoin
VOLUME /data
COPY docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 1331 1441 17777 17766 18888 18443 31331 31441
CMD ["groestlcoind"]

View File

@ -0,0 +1,67 @@
#!/bin/bash
set -e
if [[ "$1" == "groestlcoin-cli" || "$1" == "groestlcoin-tx" || "$1" == "groestlcoind" || "$1" == "test_groestlcoin" ]]; then
mkdir -p "$GROESTLCOIN_DATA"
CONFIG_PREFIX=""
if [[ "${GROESTLCOIN_NETWORK}" == "regtest" ]]; then
CONFIG_PREFIX=$'regtest=1\n[regtest]'
elif [[ "${GROESTLCOIN_NETWORK}" == "testnet" ]]; then
CONFIG_PREFIX=$'testnet=1\n[test]'
elif [[ "${GROESTLCOIN_NETWORK}" == "mainnet" ]]; then
CONFIG_PREFIX=$'mainnet=1\n[main]'
elif [[ "${GROESTLCOIN_NETWORK}" == "signet" ]]; then
CONFIG_PREFIX=$'signet=1\n[signet]'
else
GROESTLCOIN_NETWORK="mainnet"
CONFIG_PREFIX=$'mainnet=1\n[main]'
fi
if [[ "$GROESTLCOIN_WALLETDIR" ]] && [[ "$GROESTLCOIN_NETWORK" ]]; then
NL=$'\n'
WALLETDIR="$GROESTLCOIN_WALLETDIR/${GROESTLCOIN_NETWORK}"
WALLETFILE="${WALLETDIR}/wallet.dat"
mkdir -p "$WALLETDIR"
chown -R groestlcoin:groestlcoin "$WALLETDIR"
CONFIG_PREFIX="${CONFIG_PREFIX}${NL}walletdir=${WALLETDIR}${NL}"
: "${CREATE_WALLET:=true}"
if ! [[ -f "${WALLETFILE}" ]] && [[ "${CREATE_WALLET}" != "false" ]]; then
echo "The wallet does not exists, creating it at ${WALLETDIR}..."
gosu groestlcoin groestlcoin-wallet "-datadir=${WALLETDIR}" "-legacy" "-wallet=" create
fi
fi
cat <<-EOF > "$GROESTLCOIN_DATA/groestlcoin.conf"
${CONFIG_PREFIX}
printtoconsole=1
rpcallowip=::/0
${GROESTLCOIN_EXTRA_ARGS}
EOF
chown groestlcoin:groestlcoin "$GROESTLCOIN_DATA/groestlcoin.conf"
if [[ "${GROESTLCOIN_TORCONTROL}" ]]; then
# Because groestlcoind only accept torcontrol= host as an ip only, we resolve it here and add to config
TOR_CONTROL_HOST=$(echo ${GROESTLCOIN_TORCONTROL} | cut -d ':' -f 1)
TOR_CONTROL_PORT=$(echo ${GROESTLCOIN_TORCONTROL} | cut -d ':' -f 2)
if [[ "$TOR_CONTROL_HOST" ]] && [[ "$TOR_CONTROL_PORT" ]]; then
TOR_IP=$(getent hosts $TOR_CONTROL_HOST | cut -d ' ' -f 1)
echo "torcontrol=$TOR_IP:$TOR_CONTROL_PORT" >> "$GROESTLCOIN_DATA/groestlcoin.conf"
echo "Added "torcontrol=$TOR_IP:$TOR_CONTROL_PORT" to $GROESTLCOIN_DATA/groestlcoin.conf"
else
echo "Invalid GROESTLCOIN_TORCONTROL"
fi
fi
# ensure correct ownership and linking of data directory
# we do not update group ownership here, in case users want to mount
# a host directory and still retain access to it
chown -R groestlcoin "$GROESTLCOIN_DATA"
ln -sfn "$GROESTLCOIN_DATA" /home/groestlcoin/.groestlcoin
chown -h groestlcoin:groestlcoin /home/groestlcoin/.groestlcoin
rm -f /home/groestlcoin/.groestlcoin/settings.json
exec gosu groestlcoin "$@"
else
exec "$@"
fi

View File

@ -0,0 +1,47 @@
FROM debian:bookworm-slim as builder
RUN set -ex \
&& apt-get update \
&& apt-get install -qq --no-install-recommends ca-certificates dirmngr gosu wget
ENV GROESTLCOIN_VERSION 28.0
ENV GROESTLCOIN_TARBALL groestlcoin-${GROESTLCOIN_VERSION}-x86_64-linux-gnu.tar.gz
ENV GROESTLCOIN_URL https://github.com/Groestlcoin/groestlcoin/releases/download/v$GROESTLCOIN_VERSION/$GROESTLCOIN_TARBALL
ENV GROESTLCOIN_SHA256 540d5d7c6bb0449763567ea7c2559e124d61b82a6b2798701d5759458d9c21d7
# install groestlcoin binaries
RUN set -ex \
&& cd /tmp \
&& wget -qO $GROESTLCOIN_TARBALL "$GROESTLCOIN_URL" \
&& echo "$GROESTLCOIN_SHA256 $GROESTLCOIN_TARBALL" | sha256sum -c - \
&& mkdir bin \
&& tar -xzvf $GROESTLCOIN_TARBALL -C /tmp/bin --strip-components=2 "groestlcoin-$GROESTLCOIN_VERSION/bin/groestlcoin-cli" "groestlcoin-$GROESTLCOIN_VERSION/bin/groestlcoind" "groestlcoin-$GROESTLCOIN_VERSION/bin/groestlcoin-wallet" \
&& cd bin \
&& wget -qO gosu "https://github.com/tianon/gosu/releases/download/1.16/gosu-amd64" \
&& echo "3a4e1fc7430f9e7dd7b0cbbe0bfde26bf4a250702e84cf48a1eb2b631c64cf13 gosu" | sha256sum -c -
FROM debian:bookworm-slim
COPY --from=builder "/tmp/bin" /usr/local/bin
ARG GROESTLCOIN_USER_ID=999
ARG GROESTLCOIN_GROUP_ID=999
RUN apt-get update && \
apt-get install -qq --no-install-recommends xxd && \
rm -rf /var/lib/apt/lists/*
RUN chmod +x /usr/local/bin/gosu && groupadd -r -g $GROESTLCOIN_GROUP_ID groestlcoin && useradd -r -m -u $GROESTLCOIN_USER_ID -g groestlcoin groestlcoin
# create data directory
ENV GROESTLCOIN_DATA /data
RUN mkdir "$GROESTLCOIN_DATA" \
&& chown -R groestlcoin:groestlcoin "$GROESTLCOIN_DATA" \
&& ln -sfn "$GROESTLCOIN_DATA" /home/groestlcoin/.groestlcoin \
&& chown -h groestlcoin:groestlcoin /home/groestlcoin/.groestlcoin
VOLUME /data
COPY docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 1331 1441 17777 17766 18888 18443 31331 31441
CMD ["groestlcoind"]

View File

@ -0,0 +1,52 @@
# Use manifest image which support all architecture
FROM debian:bookworm-slim as builder
RUN set -ex \
&& apt-get update \
&& apt-get install -qq --no-install-recommends ca-certificates dirmngr gosu wget
RUN apt-get install -qq --no-install-recommends qemu-user-static binfmt-support
ENV GROESTLCOIN_VERSION 28.0
ENV GROESTLCOIN_TARBALL groestlcoin-${GROESTLCOIN_VERSION}-arm-linux-gnueabihf.tar.gz
ENV GROESTLCOIN_URL https://github.com/Groestlcoin/groestlcoin/releases/download/v$GROESTLCOIN_VERSION/$GROESTLCOIN_TARBALL
ENV GROESTLCOIN_SHA256 a66172e939d79b50d8201ca925d6dd0cce0ca478b0a92fbd459d9533fd360812
# install groestlcoin binaries
RUN set -ex \
&& cd /tmp \
&& wget -qO $GROESTLCOIN_TARBALL "$GROESTLCOIN_URL" \
&& echo "$GROESTLCOIN_SHA256 $GROESTLCOIN_TARBALL" | sha256sum -c - \
&& mkdir bin \
&& tar -xzvf $GROESTLCOIN_TARBALL -C /tmp/bin --strip-components=2 "groestlcoin-$GROESTLCOIN_VERSION/bin/groestlcoin-cli" "groestlcoin-$GROESTLCOIN_VERSION/bin/groestlcoind" "groestlcoin-$GROESTLCOIN_VERSION/bin/groestlcoin-wallet" \
&& cd bin \
&& wget -qO gosu "https://github.com/tianon/gosu/releases/download/1.16/gosu-armhf" \
&& echo "1b670d5426e1ddbb14a14280afb6850a48c219189d4cfe7e6eb2cc08a4fc7785 gosu" | sha256sum -c -
# Making sure the builder build an arm image despite being x64
FROM arm32v7/debian:bookworm-slim
COPY --from=builder "/tmp/bin" /usr/local/bin
COPY --from=builder /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static
ARG GROESTLCOIN_USER_ID=999
ARG GROESTLCOIN_GROUP_ID=999
RUN apt-get update && \
apt-get install -qq --no-install-recommends xxd && \
rm -rf /var/lib/apt/lists/*
RUN chmod +x /usr/local/bin/gosu && groupadd -r -g $GROESTLCOIN_GROUP_ID groestlcoin && useradd -r -m -u $GROESTLCOIN_USER_ID -g groestlcoin groestlcoin
# create data directory
ENV GROESTLCOIN_DATA /data
RUN mkdir "$GROESTLCOIN_DATA" \
&& chown -R groestlcoin:groestlcoin "$GROESTLCOIN_DATA" \
&& ln -sfn "$GROESTLCOIN_DATA" /home/groestlcoin/.groestlcoin \
&& chown -h groestlcoin:groestlcoin /home/groestlcoin/.groestlcoin
VOLUME /data
COPY docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 1331 1441 17777 17766 18888 18443 31331 31441
CMD ["groestlcoind"]

View File

@ -0,0 +1,52 @@
# Use manifest image which support all architecture
FROM debian:bookworm-slim as builder
RUN set -ex \
&& apt-get update \
&& apt-get install -qq --no-install-recommends ca-certificates dirmngr gosu wget
RUN apt-get install -qq --no-install-recommends qemu-user-static binfmt-support
ENV GROESTLCOIN_VERSION 28.0
ENV GROESTLCOIN_TARBALL groestlcoin-${GROESTLCOIN_VERSION}-aarch64-linux-gnu.tar.gz
ENV GROESTLCOIN_URL https://github.com/Groestlcoin/groestlcoin/releases/download/v$GROESTLCOIN_VERSION/$GROESTLCOIN_TARBALL
ENV GROESTLCOIN_SHA256 092c6ff333a3defe2603b91c55aea6415e554a2bbc6abb3ad43ac712fa9b63b1
# install groestlcoin binaries
RUN set -ex \
&& cd /tmp \
&& wget -qO $GROESTLCOIN_TARBALL "$GROESTLCOIN_URL" \
&& echo "$GROESTLCOIN_SHA256 $GROESTLCOIN_TARBALL" | sha256sum -c - \
&& mkdir bin \
&& tar -xzvf $GROESTLCOIN_TARBALL -C /tmp/bin --strip-components=2 "groestlcoin-$GROESTLCOIN_VERSION/bin/groestlcoin-cli" "groestlcoin-$GROESTLCOIN_VERSION/bin/groestlcoind" "groestlcoin-$GROESTLCOIN_VERSION/bin/groestlcoin-wallet" \
&& cd bin \
&& wget -qO gosu "https://github.com/tianon/gosu/releases/download/1.16/gosu-arm64" \
&& echo "23fa49907d5246d2e257de3bf883f57fba47fe1f559f7e732ff16c0f23d2b6a6 gosu" | sha256sum -c -
# Making sure the builder build an arm image despite being x64
FROM arm64v8/debian:bookworm-slim
COPY --from=builder "/tmp/bin" /usr/local/bin
COPY --from=builder /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static
ARG GROESTLCOIN_USER_ID=999
ARG GROESTLCOIN_GROUP_ID=999
RUN apt-get update && \
apt-get install -qq --no-install-recommends xxd && \
rm -rf /var/lib/apt/lists/*
RUN chmod +x /usr/local/bin/gosu && groupadd -r -g $GROESTLCOIN_GROUP_ID groestlcoin && useradd -r -m -u $GROESTLCOIN_USER_ID -g groestlcoin groestlcoin
# create data directory
ENV GROESTLCOIN_DATA /data
RUN mkdir "$GROESTLCOIN_DATA" \
&& chown -R groestlcoin:groestlcoin "$GROESTLCOIN_DATA" \
&& ln -sfn "$GROESTLCOIN_DATA" /home/groestlcoin/.groestlcoin \
&& chown -h groestlcoin:groestlcoin /home/groestlcoin/.groestlcoin
VOLUME /data
COPY docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 1331 1441 17777 17766 18888 18443 31331 31441
CMD ["groestlcoind"]

View File

@ -0,0 +1,67 @@
#!/bin/bash
set -e
if [[ "$1" == "groestlcoin-cli" || "$1" == "groestlcoin-tx" || "$1" == "groestlcoind" || "$1" == "test_groestlcoin" ]]; then
mkdir -p "$GROESTLCOIN_DATA"
CONFIG_PREFIX=""
if [[ "${GROESTLCOIN_NETWORK}" == "regtest" ]]; then
CONFIG_PREFIX=$'regtest=1\n[regtest]'
elif [[ "${GROESTLCOIN_NETWORK}" == "testnet" ]]; then
CONFIG_PREFIX=$'testnet=1\n[test]'
elif [[ "${GROESTLCOIN_NETWORK}" == "mainnet" ]]; then
CONFIG_PREFIX=$'mainnet=1\n[main]'
elif [[ "${GROESTLCOIN_NETWORK}" == "signet" ]]; then
CONFIG_PREFIX=$'signet=1\n[signet]'
else
GROESTLCOIN_NETWORK="mainnet"
CONFIG_PREFIX=$'mainnet=1\n[main]'
fi
if [[ "$GROESTLCOIN_WALLETDIR" ]] && [[ "$GROESTLCOIN_NETWORK" ]]; then
NL=$'\n'
WALLETDIR="$GROESTLCOIN_WALLETDIR/${GROESTLCOIN_NETWORK}"
WALLETFILE="${WALLETDIR}/wallet.dat"
mkdir -p "$WALLETDIR"
chown -R groestlcoin:groestlcoin "$WALLETDIR"
CONFIG_PREFIX="${CONFIG_PREFIX}${NL}walletdir=${WALLETDIR}${NL}"
: "${CREATE_WALLET:=true}"
if ! [[ -f "${WALLETFILE}" ]] && [[ "${CREATE_WALLET}" != "false" ]]; then
echo "The wallet does not exists, creating it at ${WALLETDIR}..."
gosu groestlcoin groestlcoin-wallet "-datadir=${WALLETDIR}" "-legacy" "-wallet=" create
fi
fi
cat <<-EOF > "$GROESTLCOIN_DATA/groestlcoin.conf"
${CONFIG_PREFIX}
printtoconsole=1
rpcallowip=::/0
${GROESTLCOIN_EXTRA_ARGS}
EOF
chown groestlcoin:groestlcoin "$GROESTLCOIN_DATA/groestlcoin.conf"
if [[ "${GROESTLCOIN_TORCONTROL}" ]]; then
# Because groestlcoind only accept torcontrol= host as an ip only, we resolve it here and add to config
TOR_CONTROL_HOST=$(echo ${GROESTLCOIN_TORCONTROL} | cut -d ':' -f 1)
TOR_CONTROL_PORT=$(echo ${GROESTLCOIN_TORCONTROL} | cut -d ':' -f 2)
if [[ "$TOR_CONTROL_HOST" ]] && [[ "$TOR_CONTROL_PORT" ]]; then
TOR_IP=$(getent hosts $TOR_CONTROL_HOST | cut -d ' ' -f 1)
echo "torcontrol=$TOR_IP:$TOR_CONTROL_PORT" >> "$GROESTLCOIN_DATA/groestlcoin.conf"
echo "Added "torcontrol=$TOR_IP:$TOR_CONTROL_PORT" to $GROESTLCOIN_DATA/groestlcoin.conf"
else
echo "Invalid GROESTLCOIN_TORCONTROL"
fi
fi
# ensure correct ownership and linking of data directory
# we do not update group ownership here, in case users want to mount
# a host directory and still retain access to it
chown -R groestlcoin "$GROESTLCOIN_DATA"
ln -sfn "$GROESTLCOIN_DATA" /home/groestlcoin/.groestlcoin
chown -h groestlcoin:groestlcoin /home/groestlcoin/.groestlcoin
rm -f /home/groestlcoin/.groestlcoin/settings.json
exec gosu groestlcoin "$@"
else
exec "$@"
fi

View File

@ -0,0 +1,47 @@
FROM debian:bookworm-slim as builder
RUN set -ex \
&& apt-get update \
&& apt-get install -qq --no-install-recommends ca-certificates dirmngr gosu wget
ENV GROESTLCOIN_VERSION 29.0
ENV GROESTLCOIN_TARBALL groestlcoin-${GROESTLCOIN_VERSION}-x86_64-linux-gnu.tar.gz
ENV GROESTLCOIN_URL https://github.com/Groestlcoin/groestlcoin/releases/download/v$GROESTLCOIN_VERSION/$GROESTLCOIN_TARBALL
ENV GROESTLCOIN_SHA256 e0b3e3d96caf908060779c0d9964c777ccc4b7364af54404ff1768e018e56768
# install groestlcoin binaries
RUN set -ex \
&& cd /tmp \
&& wget -qO $GROESTLCOIN_TARBALL "$GROESTLCOIN_URL" \
&& echo "$GROESTLCOIN_SHA256 $GROESTLCOIN_TARBALL" | sha256sum -c - \
&& mkdir bin \
&& tar -xzvf $GROESTLCOIN_TARBALL -C /tmp/bin --strip-components=2 "groestlcoin-$GROESTLCOIN_VERSION/bin/groestlcoin-cli" "groestlcoin-$GROESTLCOIN_VERSION/bin/groestlcoind" "groestlcoin-$GROESTLCOIN_VERSION/bin/groestlcoin-wallet" \
&& cd bin \
&& wget -qO gosu "https://github.com/tianon/gosu/releases/download/1.16/gosu-amd64" \
&& echo "3a4e1fc7430f9e7dd7b0cbbe0bfde26bf4a250702e84cf48a1eb2b631c64cf13 gosu" | sha256sum -c -
FROM debian:bookworm-slim
COPY --from=builder "/tmp/bin" /usr/local/bin
ARG GROESTLCOIN_USER_ID=999
ARG GROESTLCOIN_GROUP_ID=999
RUN apt-get update && \
apt-get install -qq --no-install-recommends xxd && \
rm -rf /var/lib/apt/lists/*
RUN chmod +x /usr/local/bin/gosu && groupadd -r -g $GROESTLCOIN_GROUP_ID groestlcoin && useradd -r -m -u $GROESTLCOIN_USER_ID -g groestlcoin groestlcoin
# create data directory
ENV GROESTLCOIN_DATA /data
RUN mkdir "$GROESTLCOIN_DATA" \
&& chown -R groestlcoin:groestlcoin "$GROESTLCOIN_DATA" \
&& ln -sfn "$GROESTLCOIN_DATA" /home/groestlcoin/.groestlcoin \
&& chown -h groestlcoin:groestlcoin /home/groestlcoin/.groestlcoin
VOLUME /data
COPY docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 1331 1441 17777 17766 18888 18443 31331 31441
CMD ["groestlcoind"]

View File

@ -0,0 +1,52 @@
# Use manifest image which support all architecture
FROM debian:bookworm-slim as builder
RUN set -ex \
&& apt-get update \
&& apt-get install -qq --no-install-recommends ca-certificates dirmngr gosu wget
RUN apt-get install -qq --no-install-recommends qemu-user-static binfmt-support
ENV GROESTLCOIN_VERSION 29.0
ENV GROESTLCOIN_TARBALL groestlcoin-${GROESTLCOIN_VERSION}-arm-linux-gnueabihf.tar.gz
ENV GROESTLCOIN_URL https://github.com/Groestlcoin/groestlcoin/releases/download/v$GROESTLCOIN_VERSION/$GROESTLCOIN_TARBALL
ENV GROESTLCOIN_SHA256 62f380799bd28be32a66b1f28606039e5b6e683d001933de0440d4336ffa1477
# install groestlcoin binaries
RUN set -ex \
&& cd /tmp \
&& wget -qO $GROESTLCOIN_TARBALL "$GROESTLCOIN_URL" \
&& echo "$GROESTLCOIN_SHA256 $GROESTLCOIN_TARBALL" | sha256sum -c - \
&& mkdir bin \
&& tar -xzvf $GROESTLCOIN_TARBALL -C /tmp/bin --strip-components=2 "groestlcoin-$GROESTLCOIN_VERSION/bin/groestlcoin-cli" "groestlcoin-$GROESTLCOIN_VERSION/bin/groestlcoind" "groestlcoin-$GROESTLCOIN_VERSION/bin/groestlcoin-wallet" \
&& cd bin \
&& wget -qO gosu "https://github.com/tianon/gosu/releases/download/1.16/gosu-armhf" \
&& echo "1b670d5426e1ddbb14a14280afb6850a48c219189d4cfe7e6eb2cc08a4fc7785 gosu" | sha256sum -c -
# Making sure the builder build an arm image despite being x64
FROM arm32v7/debian:bookworm-slim
COPY --from=builder "/tmp/bin" /usr/local/bin
COPY --from=builder /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static
ARG GROESTLCOIN_USER_ID=999
ARG GROESTLCOIN_GROUP_ID=999
RUN apt-get update && \
apt-get install -qq --no-install-recommends xxd && \
rm -rf /var/lib/apt/lists/*
RUN chmod +x /usr/local/bin/gosu && groupadd -r -g $GROESTLCOIN_GROUP_ID groestlcoin && useradd -r -m -u $GROESTLCOIN_USER_ID -g groestlcoin groestlcoin
# create data directory
ENV GROESTLCOIN_DATA /data
RUN mkdir "$GROESTLCOIN_DATA" \
&& chown -R groestlcoin:groestlcoin "$GROESTLCOIN_DATA" \
&& ln -sfn "$GROESTLCOIN_DATA" /home/groestlcoin/.groestlcoin \
&& chown -h groestlcoin:groestlcoin /home/groestlcoin/.groestlcoin
VOLUME /data
COPY docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 1331 1441 17777 17766 18888 18443 31331 31441
CMD ["groestlcoind"]

View File

@ -0,0 +1,52 @@
# Use manifest image which support all architecture
FROM debian:bookworm-slim as builder
RUN set -ex \
&& apt-get update \
&& apt-get install -qq --no-install-recommends ca-certificates dirmngr gosu wget
RUN apt-get install -qq --no-install-recommends qemu-user-static binfmt-support
ENV GROESTLCOIN_VERSION 29.0
ENV GROESTLCOIN_TARBALL groestlcoin-${GROESTLCOIN_VERSION}-aarch64-linux-gnu.tar.gz
ENV GROESTLCOIN_URL https://github.com/Groestlcoin/groestlcoin/releases/download/v$GROESTLCOIN_VERSION/$GROESTLCOIN_TARBALL
ENV GROESTLCOIN_SHA256 43b67b0945eb63c26bf0106ce3e302d4fe0720900cd8658e84f5d7954899a2a8
# install groestlcoin binaries
RUN set -ex \
&& cd /tmp \
&& wget -qO $GROESTLCOIN_TARBALL "$GROESTLCOIN_URL" \
&& echo "$GROESTLCOIN_SHA256 $GROESTLCOIN_TARBALL" | sha256sum -c - \
&& mkdir bin \
&& tar -xzvf $GROESTLCOIN_TARBALL -C /tmp/bin --strip-components=2 "groestlcoin-$GROESTLCOIN_VERSION/bin/groestlcoin-cli" "groestlcoin-$GROESTLCOIN_VERSION/bin/groestlcoind" "groestlcoin-$GROESTLCOIN_VERSION/bin/groestlcoin-wallet" \
&& cd bin \
&& wget -qO gosu "https://github.com/tianon/gosu/releases/download/1.16/gosu-arm64" \
&& echo "23fa49907d5246d2e257de3bf883f57fba47fe1f559f7e732ff16c0f23d2b6a6 gosu" | sha256sum -c -
# Making sure the builder build an arm image despite being x64
FROM arm64v8/debian:bookworm-slim
COPY --from=builder "/tmp/bin" /usr/local/bin
COPY --from=builder /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static
ARG GROESTLCOIN_USER_ID=999
ARG GROESTLCOIN_GROUP_ID=999
RUN apt-get update && \
apt-get install -qq --no-install-recommends xxd && \
rm -rf /var/lib/apt/lists/*
RUN chmod +x /usr/local/bin/gosu && groupadd -r -g $GROESTLCOIN_GROUP_ID groestlcoin && useradd -r -m -u $GROESTLCOIN_USER_ID -g groestlcoin groestlcoin
# create data directory
ENV GROESTLCOIN_DATA /data
RUN mkdir "$GROESTLCOIN_DATA" \
&& chown -R groestlcoin:groestlcoin "$GROESTLCOIN_DATA" \
&& ln -sfn "$GROESTLCOIN_DATA" /home/groestlcoin/.groestlcoin \
&& chown -h groestlcoin:groestlcoin /home/groestlcoin/.groestlcoin
VOLUME /data
COPY docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 1331 1441 17777 17766 18888 18443 31331 31441
CMD ["groestlcoind"]