act-docker-image-for-rust-b.../Dockerfile

10 lines
532 B
Docker
Raw Normal View History

2024-09-23 15:50:55 +08:00
# 以 node:16-bullseye 镜像为基础添加openssl、libssl-dev、musl-tools、Rust 工具链等工具
# 用于构建 Rust 项目的镜像
FROM node:16-bullseye
2024-09-23 16:04:07 +08:00
RUN export RUSTUP_DIST_SERVER="https://rsproxy.cn" && export RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup"
2024-09-23 16:05:18 +08:00
RUN apt-get update && apt-get install -y openssl libssl-dev musl-tools && curl --proto '=https' --tlsv1.2 -sSf https://rsproxy.cn/rustup-init.sh | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN rustup target add x86_64-unknown-linux-musl
2024-09-23 15:50:55 +08:00
CMD [ "node" ]