未验证 提交 44df868b 编写于 作者: 羽飞's avatar 羽飞 提交者: GitHub

docker支持m1 (#74)

操作系统改用 openanolis;
使用自带的gcc(8)、cmake(3.20),安装readline-devel
Docker 支持m1(arm64架构)
上级 0074a2f6
# 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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册