forked from kwai/blaze
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d105da1
commit 0c6004c
Showing
1 changed file
with
12 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,28 @@ | ||
FROM centos:6.10 | ||
RUN cd /etc/yum.repos.d/ && ls | xargs rm | ||
RUN curl https://static.lty.fun/%E5%85%B6%E4%BB%96%E8%B5%84%E6%BA%90/SourcesList/Centos-6-Vault-Aliyun.repo --output /etc/yum.repos.d/CentOS-Base.repo | ||
RUN curl https://www.getpagespeed.com/files/centos6-scl-eol.repo --output /etc/yum.repos.d/CentOS-SCLo-scl.repo | ||
RUN curl https://www.getpagespeed.com/files/centos6-scl-rh-eol.repo --output /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo | ||
RUN curl https://www.getpagespeed.com/files/centos6-epel-eol.repo --output /etc/yum.repos.d/epel.repo | ||
RUN sed -i 's/enabled=1/enabled=0/g' /etc/yum/pluginconf.d/fastestmirror.conf | ||
RUN sed -i 's/gpgcheck=1/gpgcheck=0/g' /etc/yum.repos.d/CentOS-Base.repo | ||
RUN sed -i 's/gpgcheck=1/gpgcheck=0/g' /etc/yum.repos.d/CentOS-SCLo-scl.repo | ||
RUN sed -i 's/gpgcheck=1/gpgcheck=0/g' /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo | ||
RUN sed -i 's/gpgcheck=1/gpgcheck=0/g' /etc/yum.repos.d/epel.repo | ||
RUN ls /etc/yum.repos.d/ | ||
RUN yum clean all && yum makecache | ||
FROM openeuler:22.03-lts | ||
|
||
# install common tools | ||
RUN yum update -y | ||
RUN yum install -y centos-release-scl epel-release | ||
|
||
RUN yum install -y libzip unzip wget cmake3 openssl-devel | ||
|
||
|
||
# install gcc-9 | ||
RUN yum install -y devtoolset-9-gcc devtoolset-9-gcc-c++ | ||
RUN echo '. /opt/rh/devtoolset-9/enable' >> ~/.bashrc | ||
# install gcc-11 | ||
RUN yum install -y devtoolset-11-gcc devtoolset-11-gcc-c++ | ||
RUN echo '. /opt/rh/devtoolset-11/enable' >> ~/.bashrc | ||
|
||
# install rust nightly toolchain | ||
#RUN curl https://sh.rustup.rs > /rustup-init | ||
#RUN curl https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-musl/rustup-init > /rustup-init | ||
RUN curl https://mirrors.tuna.tsinghua.edu.cn/rustup/rustup/archive/1.21.1/x86_64-unknown-linux-gnu/rustup-init > /rustup-init | ||
#RUN curl https://mirrors.tuna.tsinghua.edu.cn/rustup/rustup/archive/1.26.0/x86_64-unknown-linux-gnu/rustup-init > /rustup-init | ||
RUN curl https://sh.rustup.rs > /rustup-init | ||
RUN chmod +x /rustup-init | ||
RUN /rustup-init -y --default-toolchain nightly-2023-08-01-x86_64-unknown-linux-gnu | ||
|
||
#RUN /rustup-init -y --default-toolchain nightly-2023-01-01-x86_64-unknown-linux-musl | ||
#RUN /rustup-init -y --default-toolchain nightly-2023-08-01-x86_64-unknown-linux-gnu | ||
RUN /rustup-init -y --default-toolchain nightly-2023-08-01-x86_64-unknown-linux-musl | ||
#RUN /rustup-init -v -y --no-modify-path | ||
# install java | ||
RUN yum install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel | ||
RUN ls /usr/lib/jvm/ | ||
RUN ls /usr/lib/jvm/java-1.8.0 | ||
RUN ls /usr/lib/jvm/java-1.8.0-openjdk.x86_64 | ||
RUN echo 'export JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk.x86_64"' >> ~/.bashrc | ||
RUN cd /usr/local/ && wget https://archive.apache.org/dist/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.tar.gz && \ | ||
tar -xvf apache-maven-3.6.0-bin.tar.gz && echo 'export MAVEN_HOME=/usr/local/apache-maven-3.6.0' >> ~/.bashrc && \ | ||
echo 'export PATH=$PATH:$MAVEN_HOME/bin' >> ~/.bashrc | ||
RUN echo 'export JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk"' >> ~/.bashrc | ||
|
||
# install maven | ||
#RUN yum install -y rh-maven35 | ||
#RUN echo 'source /opt/rh/rh-maven35/enable' >> ~/.bashrc | ||
RUN yum install -y rh-maven35 | ||
RUN echo 'source /opt/rh/rh-maven35/enable' >> ~/.bashrc | ||
|
||
# install protoc | ||
RUN wget -O /protobuf-21.7-linux-x86_64.zip https://github.com/protocolbuffers/protobuf/releases/download/v21.7/protoc-21.7-linux-x86_64.zip | ||
RUN mkdir /protobuf-bin && (cd /protobuf-bin && unzip /protobuf-21.7-linux-x86_64.zip) | ||
RUN echo 'export PATH="$PATH:/protobuf-bin/bin"' >> ~/.bashrc | ||
RUN echo 'export PATH=$HOME/.cargo/bin:$PATH' >> ~/.bashrc |