This repository was archived by the owner on Jun 5, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (32 loc) · 1.28 KB
/
Dockerfile
File metadata and controls
44 lines (32 loc) · 1.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
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
# Install dependencies and Leap
RUN apt-get update && apt-get install -y \
wget \
zstd \
libstdc++6 \
ca-certificates \
curl \
&& wget https://github.com/AntelopeIO/leap/releases/download/v5.0.2/leap_5.0.2_amd64.deb -O /tmp/leap_5.0.2_amd64.deb \
&& apt-get install -y /tmp/leap_5.0.2_amd64.deb \
&& rm /tmp/leap_5.0.2_amd64.deb
RUN nodeos --full-version
WORKDIR /mnt/dev
COPY config.ini /mnt/dev/config.ini
# Set environment variables
ENV EOSDIR=/mnt/dev
ENV SNAPSHOT_URL=https://snapshots.eosnation.io/eos-v6/latest
ENV SNAPSHOT_PATH=$EOSDIR/snapshots/latest.bin.zst
# Create necessary directories
RUN mkdir -p $EOSDIR/snapshots
# Download and decompress the latest snapshot
RUN wget $SNAPSHOT_URL -O $SNAPSHOT_PATH && \
zstd -d $SNAPSHOT_PATH -o $EOSDIR/snapshots/latest.bin && \
rm $SNAPSHOT_PATH
# Clean up the blocks directory if it exists
RUN rm -rf $EOSDIR/blocks
# Expose ports for API and P2P communication
EXPOSE 8888
EXPOSE 9876
# Start nodeos with the latest snapshot and log to stdout
CMD nodeos --data-dir $EOSDIR --config-dir $EOSDIR --snapshot $EOSDIR/snapshots/latest.bin --http-server-address=0.0.0.0:8888 --access-control-allow-origin=* --contracts-console --http-validate-host=false