forked from Chia-Network/chia-blockchain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
56 lines (46 loc) · 1.64 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
56
# CHIA BUILD STEP
FROM python:3.9 AS chia_build
ARG BRANCH=latest
ARG COMMIT=""
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
lsb-release sudo
WORKDIR /chia-blockchain-benchmarks
RUN echo "cloning ${BRANCH}" && \
git clone --depth 1 --branch ${BRANCH} --recurse-submodules=mozilla-ca https://github.com/Aidasvenc/chia-blockchain-benchmarks.git . && \
# If COMMIT is set, check out that commit, otherwise just continue
( [ ! -z "$COMMIT" ] && git fetch origin $COMMIT && git checkout $COMMIT ) || true && \
echo "running build-script" && \
/bin/sh ./install.sh
# Get yq for chia config changes
FROM mikefarah/yq:4 AS yq
# IMAGE BUILD
FROM python:3.9-slim
EXPOSE 8555 8444
ENV CHIA_ROOT=/root/.chia/mainnet
ENV keys="generate"
ENV service="node"
ENV plots_dir="/plots"
ENV farmer_address=
ENV farmer_port=
ENV testnet="false"
ENV TZ="UTC"
ENV upnp="true"
ENV log_to_file="true"
ENV healthcheck="true"
ENV chia_args=
ENV full_node_peer=
# Deprecated legacy options
ENV harvester="false"
ENV farmer="false"
# Minimal list of software dependencies
# sudo: Needed for alternative plotter install
# tzdata: Setting the timezone
# curl: Health-checks
# netcat: Healthchecking the daemon
# yq: changing config settings
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y sudo tzdata curl netcat && \
rm -rf /var/lib/apt/lists/* && \
ln -snf "/usr/share/zoneinfo/$TZ" /etc/localtime && echo "$TZ" > /etc/timezone && \
dpkg-reconfigure -f noninteractive tzdata