Skip to content

Commit 08e45b6

Browse files
committed
Add support for dashcore@22.0.0
1 parent 83c38e8 commit 08e45b6

4 files changed

Lines changed: 89 additions & 3 deletions

File tree

.github/workflows/build.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ jobs:
88
strategy:
99
matrix:
1010
version:
11+
- '22'
1112
- '20'
1213
- '19'
1314
- '18'
@@ -61,8 +62,12 @@ jobs:
6162
fi
6263
fi
6364
64-
if [[ ${DASH_CORE_VERSION} != *"alpine"* ]] && [ $(version ${DASH_CORE_VERSION}) -ge $(version "20") ]; then
65-
PLATFORMS="linux/amd64,linux/arm/v7,linux/arm64"
65+
if [[ ${DASH_CORE_VERSION} != *"alpine"* ]]; then
66+
if [ $(version ${DASH_CORE_VERSION}) -ge $(version "22") ]; then
67+
PLATFORMS="linux/amd64,linux/arm64"
68+
elif [ $(version ${DASH_CORE_VERSION}) -ge $(version "20") ]; then
69+
PLATFORMS="linux/amd64,linux/arm/v7,linux/arm64"
70+
fi
6671
fi
6772
6873
echo ::set-output name=build_date::$(date -u +'%Y-%m-%dT%H:%M:%SZ')

22/Dockerfile

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
FROM debian:stable-slim
2+
3+
LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \
4+
maintainer.1="Pedro Branco (@pedrobranco)" \
5+
maintainer.2="Rui Marinho (@ruimarinho)"
6+
7+
RUN useradd -r dash \
8+
&& apt-get update -y \
9+
&& apt-get install -y curl gnupg unzip \
10+
&& apt-get clean \
11+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
12+
&& set -ex \
13+
&& for key in \
14+
B42F6819007F00F88E364FD4036A9C25BF357DD4 \
15+
29590362EC878A81FD3C202B52527BEDABE87984 \
16+
; do \
17+
gpg --keyserver keyserver.ubuntu.com --recv-keys "$key" || \
18+
gpg --keyserver pgp.mit.edu --recv-keys "$key" || \
19+
gpg --keyserver keyserver.pgp.com --recv-keys "$key" || \
20+
gpg --keyserver keys.openpgp.org --recv-keys "$key" ; \
21+
done
22+
23+
ENV GOSU_VERSION=1.10
24+
25+
RUN curl -o /usr/local/bin/gosu -fSL https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-$(dpkg --print-architecture) \
26+
&& curl -o /usr/local/bin/gosu.asc -fSL https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-$(dpkg --print-architecture).asc \
27+
&& gpg --verify /usr/local/bin/gosu.asc \
28+
&& rm /usr/local/bin/gosu.asc \
29+
&& chmod +x /usr/local/bin/gosu
30+
31+
ARG TARGETPLATFORM
32+
ENV DASH_VERSION=22.0.0
33+
ENV DASH_FOLDER_VERSION=22.0.0
34+
ENV DASH_DATA=/home/dash/.dashcore \
35+
PATH=/opt/dashcore-${DASH_FOLDER_VERSION}/bin:$PATH
36+
RUN set -ex \
37+
&& if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then export TARGETPLATFORM=x86_64-linux-gnu; fi \
38+
&& if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then export TARGETPLATFORM=aarch64-linux-gnu; fi \
39+
&& curl -SLO https://github.com/dashpay/dash/releases/download/v${DASH_VERSION}/SHA256SUMS.asc \
40+
&& curl -SLO https://github.com/dashpay/dash/releases/download/v${DASH_VERSION}/dashcore-${DASH_VERSION}-${TARGETPLATFORM}.tar.gz \
41+
&& curl -SLO https://github.com/dashpay/dash/releases/download/v${DASH_VERSION}/dashcore-${DASH_VERSION}-${TARGETPLATFORM}.tar.gz.asc \
42+
&& gpg --verify dashcore-${DASH_VERSION}-${TARGETPLATFORM}.tar.gz.asc \
43+
&& tar -xzf dashcore-${DASH_VERSION}-${TARGETPLATFORM}.tar.gz -C /opt \
44+
&& rm *.tar.gz
45+
46+
VOLUME ["/home/dash/.dashcore"]
47+
48+
COPY docker-entrypoint.sh /entrypoint.sh
49+
50+
ENTRYPOINT ["/entrypoint.sh"]
51+
52+
EXPOSE 9998 9999 19898 19998 19999
53+
54+
CMD ["dashd"]

22/docker-entrypoint.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/sh
2+
set -e
3+
4+
if [ $(echo "$1" | cut -c1) = "-" ]; then
5+
echo "$0: assuming arguments for dashd"
6+
7+
set -- dashd "$@"
8+
fi
9+
10+
if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "dashd" ]; then
11+
mkdir -p "$DASH_DATA"
12+
chmod 700 "$DASH_DATA"
13+
chown -R dash "$DASH_DATA"
14+
15+
echo "$0: setting data directory to $DASH_DATA"
16+
17+
set -- "$@" -datadir="$DASH_DATA"
18+
fi
19+
20+
if [ "$1" = "dashd" ] || [ "$1" = "dash-cli" ] || [ "$1" = "dash-tx" ]; then
21+
echo
22+
exec gosu dash "$@"
23+
fi
24+
25+
echo
26+
exec "$@"

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ A Dash Core docker image.
66

77
## Tags
88

9-
- `20.0.4`, `20.0`, `20`, `latest` ([20/Dockerfile](https://github.com/uphold/docker-dash-core/blob/master/20/Dockerfile))
9+
- `22.0.0`, `22.0`, `22`, `latest` ([22/Dockerfile](https://github.com/uphold/docker-dash-core/blob/master/22/Dockerfile))
10+
- `20.0.4`, `20.0`, `20` ([20/Dockerfile](https://github.com/uphold/docker-dash-core/blob/master/20/Dockerfile))
1011
- `19.2.0`, `19.2`, `19` ([19/Dockerfile](https://github.com/uphold/docker-dash-core/blob/master/19/Dockerfile))
1112
- `18.0.1`, `18.0`, `18` ([18/Dockerfile](https://github.com/uphold/docker-dash-core/blob/master/18/Dockerfile))
1213
- `0.17.0.3`, `0.17` ([0.17/Dockerfile](https://github.com/uphold/docker-dash-core/blob/master/0.17/Dockerfile))

0 commit comments

Comments
 (0)