forked from Firstset/validator-swarm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
55 lines (44 loc) · 1.31 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
FROM ubuntu:22.04
# Set working directory
WORKDIR /app
EXPOSE 8000
# Install required packages including libc6
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
python3-pip \
wget \
sudo \
ssh \
libc6 \
&& rm -rf /var/lib/apt/lists/*
# Setup SSH directory
RUN mkdir -p /root/.ssh && \
chmod 700 /root/.ssh
# Copy SSH config files from project directory
COPY /.ssh /root/.ssh
RUN chmod 644 /root/.ssh
# Create a directory for downloads
RUN mkdir -p /app/downloads
# Download and install staking deposit CLI
COPY download-deposit.sh /app/
RUN chmod +x /app/download-deposit.sh && \
/app/download-deposit.sh && \
# Verify deposit CLI installation
ls -la /usr/local/bin/deposit && \
# Create symlink to ensure it's found as deposit-cli
ln -s /usr/local/bin/deposit /usr/local/bin/deposit-cli && \
# Add to PATH just in case
echo 'export PATH="/usr/local/bin:$PATH"' >> /etc/bash.bashrc && \
# Verify both executables
which deposit && \
which deposit-cli
# Copy requirements file and config
COPY requirements.txt .
COPY config.toml .
# Copy all required directories and their contents
COPY swarm/ /app/swarm/
COPY abis/ /app/abis/
COPY addresses/ /app/addresses/
COPY proofs/ /app/proofs/
RUN pip install -r requirements.txt
WORKDIR /app