forked from chuci-qin/1024-bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-dev
More file actions
67 lines (56 loc) · 2.13 KB
/
Dockerfile-dev
File metadata and controls
67 lines (56 loc) · 2.13 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
FROM ubuntu:24.04
# 设置环境变量
ENV DEBIAN_FRONTEND=noninteractive
ENV DOCKER_VERSION=24.0.7
# 安装基础工具
RUN apt-get update && apt-get install -y \
curl \
wget \
git \
vim \
build-essential \
pkg-config \
libssl-dev \
ca-certificates \
gnupg \
lsb-release \
sudo \
jq tree net-tools \
&& rm -rf /var/lib/apt/lists/*
# 安装 Docker (Docker-in-Docker)
RUN mkdir -p /etc/apt/keyrings && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && \
apt-get update && \
apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin && \
rm -rf /var/lib/apt/lists/*
# 安装 Rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# 安装 Solana CLI - 使用二进制直接下载方式
RUN cd /tmp && \
wget -q https://github.com/solana-labs/solana/releases/download/v1.18.22/solana-release-x86_64-unknown-linux-gnu.tar.bz2 && \
tar jxf solana-release-x86_64-unknown-linux-gnu.tar.bz2 && \
mv solana-release /root/.local/share/solana/install/active_release && \
rm solana-release-x86_64-unknown-linux-gnu.tar.bz2
ENV PATH="/root/.local/share/solana/install/active_release/bin:${PATH}"
# 安装 Anchor
RUN cargo install --git https://github.com/coral-xyz/anchor avm --locked --force && \
avm install 0.29.0 && \
avm use 0.29.0
ENV PATH="/root/.cargo/bin:${PATH}"
# 安装 Node.js 和 pnpm (用于测试脚本)
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs && \
npm install -g pnpm yarn
# 安装 Foundry (EVM 开发工具链)
RUN curl -L https://foundry.paradigm.xyz | bash
ENV PATH="/root/.foundry/bin:${PATH}"
RUN foundryup
# 创建工作目录
WORKDIR /workspace
# 暴露常用端口
EXPOSE 8545 8546 8899 8900 9900
CMD ["/bin/bash"]