mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-12 16:16:55 +00:00
36 lines
1.3 KiB
Docker
36 lines
1.3 KiB
Docker
FROM m.daocloud.io/docker.io/library/rockylinux:9.3 AS builder
|
|
|
|
ENV LANG C.UTF-8
|
|
|
|
RUN sed -e 's|^mirrorlist=|#mirrorlist=|g' \
|
|
-e 's|^#baseurl=http://dl.rockylinux.org/$contentdir|baseurl=https://mirrors.ustc.edu.cn/rocky|g' \
|
|
-i.bak \
|
|
/etc/yum.repos.d/rocky-extras.repo \
|
|
/etc/yum.repos.d/rocky.repo
|
|
|
|
RUN dnf makecache
|
|
|
|
RUN yum install wget git unzip gcc openssl-devel pkgconf-pkg-config -y
|
|
|
|
# install protoc
|
|
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v27.0/protoc-27.0-linux-x86_64.zip \
|
|
&& unzip protoc-27.0-linux-x86_64.zip -d protoc3 \
|
|
&& mv protoc3/bin/* /usr/local/bin/ && chmod +x /usr/local/bin/protoc \
|
|
&& rm -rf protoc-27.0-linux-x86_64.zip protoc3
|
|
|
|
# install flatc
|
|
RUN wget https://github.com/google/flatbuffers/releases/download/v24.3.25/Linux.flatc.binary.g++-13.zip \
|
|
&& unzip Linux.flatc.binary.g++-13.zip \
|
|
&& mv flatc /usr/local/bin/ && chmod +x /usr/local/bin/flatc \
|
|
&& rm -rf Linux.flatc.binary.g++-13.zip
|
|
|
|
# install rust
|
|
ENV RUSTUP_DIST_SERVER="https://rsproxy.cn"
|
|
ENV RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup"
|
|
RUN curl -o rustup-init.sh --proto '=https' --tlsv1.2 -sSf https://rsproxy.cn/rustup-init.sh \
|
|
&& sh rustup-init.sh -y && rm -rf rustup-init.sh
|
|
|
|
COPY .docker/cargo.config.toml /root/.cargo/config.toml
|
|
|
|
WORKDIR /root/s3-rustfs
|