forked from uphold/docker-dash-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
50 lines (41 loc) · 1.65 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM debian:stretch-slim
LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \
maintainer.1="Pedro Branco (@pedrobranco)" \
maintainer.2="Rui Marinho (@ruimarinho)" \
editor.0="Bruno Amaral F (@bamaralf)"
ENV DASH_VERSION=0.14.0.2
ENV DASH_SHA256=00482c0e2b861d0af042a695d8f6f2bafada0e6df036482d43ba36d51cf2464b
ENV DASH_FOLDER_VERSION=0.14.0
ENV DASH_DATA=/data
ENV DASH_PREFIX=/opt/dashcore-${DASH_FOLDER_VERSION}
ENV PATH=${DASH_PREFIX}/bin:$PATH
COPY docker-entrypoint.sh /entrypoint.sh
COPY rabbitmqadmin /usr/bin/rabbitmqadmin
COPY google-logger /usr/bin/google-logger
RUN useradd -r dash \
&& set -ex \
&& apt-get update -y \
&& apt-get install -qq --no-install-recommends ca-certificates dirmngr gosu gpg curl python-setuptools python-pip procps \
# run pip
&& pip install --upgrade google-cloud-logging \
&& pip install --upgrade grpcio==1.7.3 \
# apt clean
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
# install binaries
&& curl -SLO https://github.com/dashpay/dash/releases/download/v${DASH_VERSION}/dashcore-${DASH_VERSION}-x86_64-linux-gnu.tar.gz \
&& echo "$DASH_SHA256 dashcore-${DASH_VERSION}-x86_64-linux-gnu.tar.gz" | sha256sum -c - \
&& tar -xzf dashcore-${DASH_VERSION}-x86_64-linux-gnu.tar.gz -C /opt \
&& rm *.tar.gz \
# create folders and set permissions to workdir
&& mkdir "$DASH_DATA" \
&& chown -R dash: "$DASH_DATA" \
&& rm -rf /home/dash/.dashcore \
# set files permissions
&& chmod +x /usr/bin/rabbitmqadmin \
&& chmod +x /usr/bin/google-logger
VOLUME ["/data"]
COPY docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 9998 9999 18332 19998 19999
CMD ["dashd"]