diff --git a/Dockerfile b/Dockerfile index 6cb5f8fd4..9bedbb999 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,34 +1,29 @@ # how to use # docker build -t miniob . # make sure docker has been installed - -FROM centos:7 +# FROM rockylinux:8 +FROM openanolis/anolisos:8.6 ARG HOME_DIR=/root ARG GIT_SOURCE=github ENV LANG=en_US.UTF-8 -# install gdb -RUN yum install -y gdb - # install rpm -RUN yum install -y make git wget centos-release-scl scl-utils which flex +# note: gcc-c++ in rockylinux 8 and gcc-g++ in rockylinux 9. use `dnf groupinfo "Development Tools"` to list the tools +RUN dnf install -y make cmake git wget which flex gdb gcc gcc-c++ diffutils readline-devel texinfo +# rockylinux:9 RUN dnf --enablerepo=crb install -y texinfo +# rockylinux:8 +# RUN dnf --enablerepo=powertools install -y texinfo # prepare env -RUN yum install -y devtoolset-11-gcc devtoolset-11-gcc-c++ WORKDIR ${HOME_DIR} -RUN echo "export PATH=/opt/rh/devtoolset-11/root/bin:/usr/local/oceanbase/devtools/bin:$PATH" >> .bashrc -RUN echo "export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH" >> .bashrc - -ENV PATH /opt/rh/devtoolset-11/root/bin:/usr/local/oceanbase/devtools/bin:$PATH -ENV LD_LIBRARY_PATH /usr/local/lib64:$LD_LIBRARY_PATH +RUN echo alias ls=\"ls --color=auto\" >> .bashrc +RUN echo "export LD_LIBRARY_PATH=/usr/local/lib64:\$LD_LIBRARY_PATH" >> .bashrc # clone deps and compile deps RUN mkdir -p ${HOME_DIR}/deps WORKDIR ${HOME_DIR}/deps -RUN wget https://github.com/Kitware/CMake/releases/download/v3.24.0/cmake-3.24.0-linux-x86_64.sh \ - && bash cmake-3.24.0-linux-x86_64.sh --prefix=/usr/local/ --exclude-subdir && rm -f cmake-3.24.0-linux-x86_64.sh RUN git clone https://github.com/libevent/libevent -b release-2.1.12-stable \ && mkdir -p ${HOME_DIR}/deps/libevent/build \ @@ -68,5 +63,5 @@ RUN cmake -B ${HOME_DIR}/source/miniob/build -DDEBUG=ON -DCMAKE_C_COMPILER=`whic WORKDIR ${HOME_DIR} -ENTRYPOINT exec /sbin/init +ENTRYPOINT tail -f /dev/null