-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
93 lines (71 loc) · 2.5 KB
/
Dockerfile
File metadata and controls
93 lines (71 loc) · 2.5 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
82
83
84
85
86
87
88
89
90
91
92
93
# Base image
FROM ubuntu:24.04
# Information
LABEL maintainer="Slow Ninja <info@slow.ninja>"
# Variables
ENV DEBIAN_FRONTEND=noninteractive \
NETWORK_VERSION="111b" \
AGENT_TARGET_NUMBER=20
# Install packages
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
postgresql-common \
git \
curl \
wget \
# golang \
nodejs \
npm \
jq
# 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}"
RUN sed -i "s/read enter//g" /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
RUN cat /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh && \
/usr/share/postgresql-common/pgdg/apt.postgresql.org.sh && \
apt-get -y install postgresql-client
RUN rm -rf /var/lib/apt/lists/*
ENV PATH=$PATH:/usr/local/go/bin
# 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/local/bin/
# Add the user and groups appropriately
RUN addgroup --system structs && \
adduser --system --home /src/structs --shell /bin/bash --group structs
# Setup the scripts
WORKDIR /src
RUN chown -R structs /src/structs
COPY scripts/* /src/structs/
RUN chmod a+x /src/structs/*
RUN mkdir /var/structs && \
mkdir /var/structs/bin && \
mkdir /var/structs/chain && \
mkdir /var/structs/accounts && \
mkdir /var/structs/tsa && \
mkdir /var/structs/tsa/tmp && \
mkdir /root/.structs && \
mkdir /root/.structs/config && \
ln -s /var/structs/accounts /root/.structs/keyring-test
COPY config/client.toml /var/structs/chain/config/client.toml
COPY config/client.toml /root/.structs/config/client.toml
ENV PATH="$PATH:/var/structs/bin"
RUN git clone https://github.com/playstructs/structs-sign-proxy.git && \
cd structs-sign-proxy && \
npm install -g . && \
cd ..
# Building latest structsd
RUN git clone https://github.com/playstructs/structsd.git && \
cd structsd && \
ignite chain build
RUN mkdir -p /usr/local/go/bin && \
cp /root/go/bin/structsd /usr/local/go/bin/structsd
# Run Structs
CMD [ "/src/structs/tsa.sh" ]