Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (34 loc) · 1.48 KB
/
Copy pathDockerfile
File metadata and controls
39 lines (34 loc) · 1.48 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
FROM debian:trixie-slim
ENV BASE_PATH=/node/chain
ENV RUST_BACKTRACE=1
# ntp to keep correct time
# curl to enable compose healthchecks
RUN apt-get update -qq && \
apt-get upgrade -y -qq && \
apt-get install -y -qq --no-install-recommends ca-certificates curl procps strace \
gdb vim jq tree build-essential git cmake wget libtool autoconf automake && \
# Build libfaketime with FORCE_MONOTONIC_FIX and FORCE_PTHREAD_NONVER
git clone https://github.com/wolfcw/libfaketime.git && \
cd /libfaketime/src && \
make clean && \
CFLAGS="-DFORCE_MONOTONIC_FIX -DFORCE_PTHREAD_NONVER" make && \
make install && \
cd / && rm -rf /libfaketime && \
# Download bytehound
wget -q https://github.com/koute/bytehound/releases/download/0.11.0/bytehound-x86_64-unknown-linux-gnu.tgz && \
[ -f bytehound-x86_64-unknown-linux-gnu.tgz ] && \
tar -xzvf bytehound-x86_64-unknown-linux-gnu.tgz && \
mv libbytehound.so /usr/lib/libbytehound.so && \
rm -rf bytehound* && \
# Cleanup
apt-get clean && rm -rf /var/lib/apt/lists/*
COPY .envrc ./bin/.envrc
COPY res/ ./res/
COPY node/bin/entrypoint.sh /entrypoint.sh
COPY midnight-node /midnight-node
RUN useradd -u 10001 -d /nonexistent -s /usr/sbin/nologin -M -U -c "" appuser && passwd -l appuser && \
chmod +x /midnight-node && \
chown appuser:appuser /midnight-node
# Note: Don't switch to appuser here - entrypoint.sh will do it with runuser
EXPOSE 30333 9933 9944 9615
ENTRYPOINT ["/entrypoint.sh"]