Update Dogecoin 1.14.4 (#33)

This commit is contained in:
Mike Olthoff 2021-09-22 22:43:04 -07:00 committed by GitHub
parent 96ad18bd12
commit d2c8c0ca0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,24 @@
#!/bin/bash
set -e
if [[ "$1" == "dogecoin-cli" || "$1" == "dogecoin-tx" || "$1" == "dogecoind" || "$1" == "test_dogecoin" ]]; then
mkdir -p "$DOGECOIN_DATA"
cat <<-EOF > "$DOGECOIN_DATA/dogecoin.conf"
printtoconsole=1
rpcallowip=::/0
${DOGECOIN_EXTRA_ARGS}
EOF
chown dogecoin:dogecoin "$DOGECOIN_DATA/dogecoin.conf"
# 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 dogecoin "$DOGECOIN_DATA"
ln -sfn "$DOGECOIN_DATA" /home/dogecoin/.dogecoin
chown -h dogecoin:dogecoin /home/dogecoin/.dogecoin
exec gosu dogecoin "$@"
else
exec "$@"
fi

View File

@ -0,0 +1,34 @@
FROM debian:stretch-slim
RUN groupadd -r dogecoin && useradd -r -m -g dogecoin dogecoin
RUN set -ex \
&& apt-get update \
&& apt-get install -qq --no-install-recommends ca-certificates dirmngr gosu gpg wget \
&& rm -rf /var/lib/apt/lists/*
ENV DOGECOIN_VERSION 1.14.4
ENV DOGECOIN_URL https://github.com/dogecoin/dogecoin/releases/download/v1.14.4/dogecoin-1.14.4-x86_64-linux-gnu.tar.gz
ENV DOGECOIN_SHA256 6266235ABE4BCBD41EA57BDF42F11EF89AA69F0386E8C8846D5228AF69E7FA13
# install Dogecoin binaries
RUN set -ex \
&& cd /tmp \
&& wget -qO dogecoin.tar.gz "$DOGECOIN_URL" \
&& echo "$DOGECOIN_SHA256 dogecoin.tar.gz" | sha256sum -c - \
&& tar -xzvf dogecoin.tar.gz -C /usr/local --strip-components=1 --exclude=*-qt \
&& rm -rf /tmp/*
# create data directory
ENV DOGECOIN_DATA /data
RUN mkdir "$DOGECOIN_DATA" \
&& chown -R dogecoin:dogecoin "$DOGECOIN_DATA" \
&& ln -sfn "$DOGECOIN_DATA" /home/dogecoin/.dogecoin \
&& chown -h dogecoin:dogecoin /home/dogecoin/.dogecoin
VOLUME /data
COPY docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 5222 5223 25222 25223 25222 25223
CMD ["dogecoind"]