-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
56 lines (44 loc) · 1.43 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
51
52
53
54
55
# syntax=docker/dockerfile:experimental
# Run as
#
# --ulimit nofile=64000:64000
# BUILD PARAMTERS
ARG UBUNTUVER=20.04
FROM ubuntu:${UBUNTUVER}
ARG REVISION=ea56802
ARG GHCVER=8.10.7
ARG UBUNTUVER
ARG STRIP=1
LABEL revision="$REVISION"
LABEL ghc="$GHCVER"
LABEL ubuntu="$UBUNTUVER"
# install prerequisites
RUN apt-get update \
&& apt-get install -y librocksdb-dev curl xxd openssl binutils \
&& rm -rf /var/lib/apt/lists/*
# Install chainweb applications
WORKDIR /chainweb
RUN curl -Ls "https://kadena-cabal-cache.s3.amazonaws.com/chainweb-node/chainweb.${GHCVER}.ubuntu-${UBUNTUVER}.${REVISION}.tar.gz" \
| tar -xzC "/" \
chainweb/chainweb-node \
chainweb/LICENSE \
chainweb/README.md \
chainweb/CHANGELOG.md \
&& { [ $STRIP -eq 1 ] && strip chainweb-node ; }
# Install scripts
COPY run-chainweb-node.sh .
COPY initialize-db.sh .
COPY chainweb.mainnet01.yaml .
COPY chainweb.testnet04.yaml .
COPY chainweb.development.yaml .
COPY check-health.sh .
RUN chmod 755 run-chainweb-node.sh initialize-db.sh check-health.sh
# Create Database directories
RUN mkdir -p /data/chainweb-db \
mkdir -p /root/.local/share/chainweb-node/mainnet01/ \
mkdir -p /root/.local/share/chainweb-node/testnet04/ \
mkdir -p /root/.local/share/chainweb-node/development/
# Command
STOPSIGNAL SIGTERM
HEALTHCHECK --start-period=5m --interval=1m --retries=5 --timeout=10s CMD ./check-health.sh
CMD ./run-chainweb-node.sh