-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
81 lines (67 loc) · 2.28 KB
/
Dockerfile
File metadata and controls
81 lines (67 loc) · 2.28 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Base image
FROM ubuntu:24.04
# Information
LABEL maintainer="Slow Ninja <info@slow.ninja>"
# Variables
ENV DEBIAN_FRONTEND=noninteractive \
STRUCTS_PATH="/root/.structs" \
STRUCTS_REACTOR_SHARE="/root/reactor_share" \
STRUCTS_REACTOR_BACKUP="/root/reactor_backup" \
STRUCTS_CHAIN_ID="structstestnet-109" \
STRUCTS_NETWORK_VERSION="109b" \
STRUCTS_MONIKER="UnknownGuild" \
STRUCTSD_HOST="structsd" \
STRUCTS_VALIDATOR_INITIAL_STAKING_AMOUNT="50000000" \
STRUCTS_VALIDATOR_IDENTITY="UnknownDroid" \
STRUCTS_GUILD_WEBSITE="https://playstructs.com" \
STRUCTS_GUILD_CONTACT="UnknownDroidLeader" \
STRUCTS_VALIDATOR_COMMISSION_RATE="0.1" \
STRUCTS_VALIDATOR_MAX_RATE="0.2" \
STRUCTS_VALIDATOR_MAX_CHANGE_RATE="0.01" \
STRUCTS_VALIDATOR_MIN_SELF_DELEGATION="1" \
STRUCTS_INDEXER_PG_CONNECTION="" \
STRUCTSD_ARGUMENTS="--log_level info"
# Install packages
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
git \
curl \
postgresql-client \
jq \
nano \
&& \
rm -rf /var/lib/apt/lists/*
# Install Go 1.24.1
RUN curl -LO https://go.dev/dl/go1.24.1.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go1.24.1.linux-amd64.tar.gz && \
rm go1.24.1.linux-amd64.tar.gz
ENV PATH="/usr/local/go/bin:/root/go/bin:${PATH}"
# Put this file into place so that the ignite command does not
# get stuck waiting for input
RUN mkdir /root/.ignite
COPY config/anon_identity.json /root/.ignite/anon_identity.json
# Install ignite
RUN curl -L -o ignite.tar.gz https://github.com/ignite/cli/releases/download/v28.8.2/ignite_28.8.2_linux_amd64.tar.gz && \
tar -xzvf ignite.tar.gz && \
mv ignite /usr/bin/
#RUN curl https://get.ignite.com/cli! | bash
# Expose ports
EXPOSE 26656
EXPOSE 26657
EXPOSE 1317
# Building latest structsd
RUN git clone https://github.com/playstructs/structsd.git && \
cd structsd && \
ignite chain build && \
cp /root/go/bin/structsd /usr/bin/structsd
RUN mkdir $STRUCTS_PATH && \
mkdir $STRUCTS_REACTOR_SHARE && \
mkdir $STRUCTS_REACTOR_BACKUP && \
mkdir /root/scripts && \
mkdir /root/config
COPY scripts/ /root/scripts/
RUN chmod a+x /root/scripts/*
COPY config/ /root/config/
# Run Structs
CMD [ "bash", "/root/scripts/start.sh" ]