-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.base
More file actions
22 lines (18 loc) · 852 Bytes
/
Dockerfile.base
File metadata and controls
22 lines (18 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM centos:8
# 安装工具链
RUN cd /etc/yum.repos.d/
RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
RUN yum update -y
RUN yum install gcc-c++ cmake make openssl-devel git -y
# 拷贝当前目录
RUN rm -rf /root/source/green
COPY ./deps /root/source/green/deps
WORKDIR /root/source/green/deps
RUN cd mariadb-connector-c-3.3 && mkdir build && cd build && cmake .. && make -j4 && make install && cd ../../
RUN mkdir build && cd build
WORKDIR /root/source/green/deps/build
RUN cmake ../mariadb-connector-cpp/ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCONC_WITH_UNIT_TESTS=Off -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_SSL=OPENSSL
RUN cmake --build . --config RelWithDebInfo
RUN make install
RUN rm -rf /root/source/green/deps