Skip to content

Commit 11428fe

Browse files
authored
chore: update Dash to 23.1.2 (#133)
Co-authored-by: PastaClaw <thepastaclaw@users.noreply.github.com>
1 parent 14f5f26 commit 11428fe

3 files changed

Lines changed: 131 additions & 0 deletions

File tree

Dash/23.1.2/docker-entrypoint.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/bash
2+
set -e
3+
4+
if [[ "$1" == "dash-cli" || "$1" == "dash-tx" || "$1" == "dashd" || "$1" == "test_dash" ]]; then
5+
mkdir -p "$BITCOIN_DATA"
6+
7+
CONFIG_PREFIX=""
8+
if [[ "${BITCOIN_NETWORK}" == "regtest" ]]; then
9+
CONFIG_PREFIX=$'regtest=1\n[regtest]'
10+
fi
11+
if [[ "${BITCOIN_NETWORK}" == "testnet" ]]; then
12+
CONFIG_PREFIX=$'testnet=1\n[test]'
13+
fi
14+
if [[ "${BITCOIN_NETWORK}" == "mainnet" ]]; then
15+
CONFIG_PREFIX=$'mainnet=1\n[main]'
16+
fi
17+
18+
cat <<-EOF > "$BITCOIN_DATA/dash.conf"
19+
${CONFIG_PREFIX}
20+
printtoconsole=1
21+
rpcallowip=::/0
22+
${BITCOIN_EXTRA_ARGS}
23+
EOF
24+
chown bitcoin:bitcoin "$BITCOIN_DATA/dash.conf"
25+
rm -f "$BITCOIN_DATA/settings.json"
26+
27+
# ensure correct ownership and linking of data directory
28+
# we do not update group ownership here, in case users want to mount
29+
# a host directory and still retain access to it
30+
chown -R bitcoin "$BITCOIN_DATA"
31+
ln -sfn "$BITCOIN_DATA" /home/bitcoin/.dashcore
32+
chown -h bitcoin:bitcoin /home/bitcoin/.dashcore
33+
34+
exec gosu bitcoin "$@"
35+
else
36+
exec "$@"
37+
fi

Dash/23.1.2/linuxamd64.Dockerfile

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
FROM debian:bullseye-slim as builder
2+
3+
RUN set -ex \
4+
&& apt-get update \
5+
&& apt-get install -qq --no-install-recommends ca-certificates dirmngr gosu gpg gpg-agent wget
6+
7+
ENV DASH_VERSION 23.1.2
8+
ENV DASH_URL https://github.com/dashpay/dash/releases/download/v${DASH_VERSION}/dashcore-${DASH_VERSION}-x86_64-linux-gnu.tar.gz
9+
ENV DASH_SHA256 3fb1392edf967c7007f5b84317d1f497cf8eece16b0760dfe6e37700012e856a
10+
ENV DASH_ASC_URL https://github.com/dashpay/dash/releases/download/v${DASH_VERSION}/dashcore-${DASH_VERSION}-x86_64-linux-gnu.tar.gz.asc
11+
ENV DASH_PGP_KEY 52527BEDABE87984
12+
13+
# install dash binaries
14+
RUN set -ex \
15+
&& cd /tmp \
16+
&& wget -qO dash.tar.gz "$DASH_URL" \
17+
&& echo "$DASH_SHA256 dash.tar.gz" | sha256sum -c - \
18+
&& gpg --keyserver keyserver.ubuntu.com --recv-keys "$DASH_PGP_KEY" \
19+
&& wget -qO dash.asc "$DASH_ASC_URL" \
20+
&& gpg --verify dash.asc dash.tar.gz \
21+
&& mkdir bin \
22+
&& tar -xzvf dash.tar.gz -C /tmp/bin --strip-components=2 "dashcore-$DASH_VERSION/bin/dash-cli" "dashcore-$DASH_VERSION/bin/dashd" \
23+
&& cd bin \
24+
&& wget -qO gosu "https://github.com/tianon/gosu/releases/download/1.11/gosu-amd64" \
25+
&& echo "0b843df6d86e270c5b0f5cbd3c326a04e18f4b7f9b8457fa497b0454c4b138d7 gosu" | sha256sum -c -
26+
27+
FROM debian:bullseye-slim
28+
COPY --from=builder "/tmp/bin" /usr/local/bin
29+
30+
RUN chmod +x /usr/local/bin/gosu && groupadd -r bitcoin && useradd -r -m -g bitcoin bitcoin
31+
32+
# create data directory
33+
ENV BITCOIN_DATA /data
34+
RUN mkdir "$BITCOIN_DATA" \
35+
&& chown -R bitcoin:bitcoin "$BITCOIN_DATA" \
36+
&& ln -sfn "$BITCOIN_DATA" /home/bitcoin/.dashcore \
37+
&& chown -h bitcoin:bitcoin /home/bitcoin/.dashcore
38+
39+
VOLUME /data
40+
41+
COPY docker-entrypoint.sh /entrypoint.sh
42+
ENTRYPOINT ["/entrypoint.sh"]
43+
44+
EXPOSE 9998 9999 19998 19999
45+
CMD ["dashd"]
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Use manifest image which support all architecture
2+
FROM debian:bullseye-slim as builder
3+
4+
RUN set -ex \
5+
&& apt-get update \
6+
&& apt-get install -qq --no-install-recommends ca-certificates dirmngr gosu gpg gpg-agent wget
7+
8+
ENV DASH_VERSION 23.1.2
9+
ENV DASH_URL https://github.com/dashpay/dash/releases/download/v${DASH_VERSION}/dashcore-${DASH_VERSION}-aarch64-linux-gnu.tar.gz
10+
ENV DASH_SHA256 8f42584ef119b83829a09dd9b9fb971b9ae5e533591da9df0d5b79f8b1784f1f
11+
ENV DASH_ASC_URL https://github.com/dashpay/dash/releases/download/v${DASH_VERSION}/dashcore-${DASH_VERSION}-aarch64-linux-gnu.tar.gz.asc
12+
ENV DASH_PGP_KEY 52527BEDABE87984
13+
14+
# install dash binaries
15+
RUN set -ex \
16+
&& cd /tmp \
17+
&& wget -qO dash.tar.gz "$DASH_URL" \
18+
&& echo "$DASH_SHA256 dash.tar.gz" | sha256sum -c - \
19+
&& gpg --keyserver keyserver.ubuntu.com --recv-keys "$DASH_PGP_KEY" \
20+
&& wget -qO dash.asc "$DASH_ASC_URL" \
21+
&& gpg --verify dash.asc dash.tar.gz \
22+
&& mkdir bin \
23+
&& tar -xzvf dash.tar.gz -C /tmp/bin --strip-components=2 "dashcore-$DASH_VERSION/bin/dash-cli" "dashcore-$DASH_VERSION/bin/dashd" \
24+
&& cd bin \
25+
&& wget -qO gosu "https://github.com/tianon/gosu/releases/download/1.11/gosu-arm64" \
26+
&& echo "5e279972a1c7adee65e3b5661788e8706594b458b7ce318fecbd392492cc4dbd gosu" | sha256sum -c -
27+
28+
# Making sure the builder build an arm image despite being x64
29+
FROM --platform=arm64 debian:bullseye-slim
30+
31+
COPY --from=builder "/tmp/bin" /usr/local/bin
32+
#EnableQEMU COPY qemu-aarch64-static /usr/bin
33+
34+
RUN chmod +x /usr/local/bin/gosu && groupadd -r bitcoin && useradd -r -m -g bitcoin bitcoin
35+
36+
# create data directory
37+
ENV BITCOIN_DATA /data
38+
RUN mkdir "$BITCOIN_DATA" \
39+
&& chown -R bitcoin:bitcoin "$BITCOIN_DATA" \
40+
&& ln -sfn "$BITCOIN_DATA" /home/bitcoin/.dashcore \
41+
&& chown -h bitcoin:bitcoin /home/bitcoin/.dashcore
42+
43+
VOLUME /data
44+
45+
COPY docker-entrypoint.sh /entrypoint.sh
46+
ENTRYPOINT ["/entrypoint.sh"]
47+
48+
EXPOSE 9998 9999 19998 19999
49+
CMD ["dashd"]

0 commit comments

Comments
 (0)