Skip to content

Commit

Permalink
[feat][chores] Add rustup for dockerfile.
Browse files Browse the repository at this point in the history
Signed-off-by: Ketor <[email protected]>
  • Loading branch information
ketor authored and rock-git committed May 20, 2024
1 parent f533e5d commit 24e56fb
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
FROM rockylinux/rockylinux:8.9
FROM rockylinux/rockylinux:8

ENV TZ=Asia/Shanghai
ENV TZ=Asia/Shanghai
SHELL ["/bin/bash", "-c"]

RUN dnf update -y \
&& dnf install -y vim unzip net-tools tzdata wget git gcc gcc-c++ make automake openssl openssl-devel gcc-toolset-13* libtool patch \
&& dnf clean all \
&& ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \
&& echo ${TZ} > /etc/timezone \
&& unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY
&& unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY

COPY ./dingo-store.tar.gz /opt

RUN cd /opt && mkdir dingo-store && tar -zxvf dingo-store.tar.gz -C dingo-store && chmod +x -R /opt/dingo-store/* && sed -i 's/electionTimeout: [0-9]\+/electionTimeout: 30000/g' /opt/dingo-store/conf/store.template.yaml && sed -i 's/electionTimeout: [0-9]\+/electionTimeout: 30000/g' /opt/dingo-store/conf/coordinator.template.yaml

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

ENV PATH=/opt/rh/gcc-toolset-13/root/usr/bin:$PATH
WORKDIR /opt/dingo-store

Expand Down
4 changes: 4 additions & 0 deletions docker/centos7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ RUN yum makecache \
RUN mv /tmp/oneAPI.repo /etc/yum.repos.d
RUN yum -y install intel-oneapi-mkl-devel && yum clean all

# install rust
RUN wget https://sh.rustup.rs --content-disposition
RUN sh rustup-init.sh -y

# soure env
RUN echo "source /opt/intel/oneapi/setvars.sh" >> /root/.bashrc

Expand Down
4 changes: 4 additions & 0 deletions docker/centos8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && sed -i 's|#
&& mv cmake-3.26.4-linux-x86_64 /opt/ \
&& rm -f cmake-3.26.4-linux-x86_64.tar.gz

# install rust
RUN wget https://sh.rustup.rs --content-disposition
RUN sh rustup-init.sh -y

# soure env
RUN echo "source /opt/intel/oneapi/setvars.sh" >> /root/.bashrc

Expand Down
4 changes: 4 additions & 0 deletions docker/rocky8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ RUN dnf update -y \
&& mv cmake-3.26.4-linux-x86_64 /opt/ \
&& rm -f cmake-3.26.4-linux-x86_64.tar.gz

# install rust
RUN wget https://sh.rustup.rs --content-disposition
RUN sh rustup-init.sh -y

# soure env
RUN echo "source /opt/intel/oneapi/setvars.sh" >> /root/.bashrc

Expand Down
4 changes: 4 additions & 0 deletions docker/rocky9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ RUN dnf update -y \
&& tar -zxvf cmake-3.27.8-linux-x86_64.tar.gz \
&& mv cmake-3.27.8-linux-x86_64 /opt/

# install rust
RUN wget https://sh.rustup.rs --content-disposition
RUN sh rustup-init.sh -y

# soure env
RUN echo "source /opt/intel/oneapi/setvars.sh" >> /root/.bashrc

Expand Down
4 changes: 4 additions & 0 deletions docker/ubuntu18/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/* \
&& wget https://cmake.org/files/v3.25/cmake-3.25.2.tar.gz --no-check-certificate && tar -zxvf cmake-3.25.2.tar.gz && rm -f cmake-3.25.2.tar.gz && cd cmake-3.25.2 && ./bootstrap && make -j$(nproc) && make install && cd .. && rm -rf cmake-3.25.2

# install rust
RUN wget https://sh.rustup.rs --content-disposition
RUN sh rustup-init.sh -y

ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/

WORKDIR /opt
4 changes: 4 additions & 0 deletions docker/ubuntu22/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/* \
&& wget https://cmake.org/files/v3.25/cmake-3.25.2.tar.gz --no-check-certificate && tar -zxvf cmake-3.25.2.tar.gz && rm -f cmake-3.25.2.tar.gz && cd cmake-3.25.2 && ./bootstrap && make -j$(nproc) && make install && cd .. && rm -rf cmake-3.25.2

# install rust
RUN wget https://sh.rustup.rs --content-disposition
RUN sh rustup-init.sh -y

# soure env
RUN echo "source /opt/intel/oneapi/setvars.sh" >> /root/.bashrc

Expand Down
30 changes: 30 additions & 0 deletions docker/ubuntu24/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM ubuntu:24.04

ENV TZ=Asia/Shanghai \
DEBIAN_FRONTEND=noninteractive
SHELL ["/bin/bash", "-c"]

RUN apt-get update \
&& apt-get install -y openjdk-8-jdk vim unzip netcat net-tools tzdata wget git gcc g++ make automake maven openssl libssl-dev cmake libtool gpg \
&& wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null \
&& echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | tee /etc/apt/sources.list.d/oneAPI.list \
&& apt-get update && apt-get install -y intel-oneapi-mkl-devel \
&& unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY \
&& ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \
&& echo ${TZ} > /etc/timezone \
&& dpkg-reconfigure --frontend noninteractive tzdata \
&& rm -rf /var/lib/apt/lists/* \
&& wget https://cmake.org/files/v3.25/cmake-3.25.2.tar.gz --no-check-certificate && tar -zxvf cmake-3.25.2.tar.gz && rm -f cmake-3.25.2.tar.gz && cd cmake-3.25.2 && ./bootstrap && make -j$(nproc) && make install && cd .. && rm -rf cmake-3.25.2

# install rust
RUN wget https://sh.rustup.rs --content-disposition
RUN sh rustup-init.sh -y

# soure env
RUN echo "source /opt/intel/oneapi/setvars.sh" >> /root/.bashrc

ENV PATH="/opt/intel/oneapi:$PATH"

ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/

WORKDIR /opt

0 comments on commit 24e56fb

Please sign in to comment.