forked from dremio/warpdrive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
80 lines (66 loc) · 2.25 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#
# Copyright (C) 2020-2022 Dremio Corporation
#
# See “license.txt” for license information.
FROM centos:centos7
RUN yum groupinstall -y "Development Tools" && \
yum update -y && \
yum install -y epel-release && \
yum install -y zlib-devel && \
yum install -y *protobuf* && \
yum install -y openssl* && \
yum install -y centos-release-scl && \
yum install -y devtoolset-9-gcc* && \
yum install -y unixODBC-devel && \
yum install -y ninja-build && \
yum install -y rapidjson-devel && \
yum install -y cmake3 && \
ln -s /usr/bin/cmake3 /usr/bin/cmake
SHELL [ "/usr/bin/scl", "enable", "devtoolset-9" ]
RUN cd /tmp && \
git clone -b v1.36.4 https://github.com/grpc/grpc && \
cd grpc && \
git submodule update --init && \
mkdir -p cmake-build && cd cmake-build && \
cmake .. && make && make install && \
rm -rf /tmp/grpc
RUN rm /usr/local/lib/libssl.a /usr/local/lib/libcrypto.a && \
ln -s /usr/lib64/libssl.a /usr/local/lib/libssl.a && \
ln -s /usr/lib64/libcrypto.a /usr/local/lib/libcrypto.a
RUN yum install -y wget && \
wget https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz && \
tar -xzf boost_1_76_0.tar.gz && \
cd boost_1_76_0 && \
./bootstrap.sh --prefix=/opt/boost && \
./b2 install --prefix=/opt/boost --with=all || true
RUN echo $'[ODBC] \n\
Trace=yes \n\
TraceFile=/tmp/odbctrace.log \n\
[ODBC Drivers] \n\
FlightSQL = Installed \n\
FlightSQL-Debug = Installed \n\
[FlightSQL] \n\
Description=FlightSQL Driver \n\
Driver=/opt/warpdrive/_build/release/libarrow-odbc.so \n\
FileUsage=1 \n\
UsageCount=1 \n\
[FlightSQL-Debug] \n\
Description=FlightSQL Driver \n\
Driver=/opt/warpdrive/_build/debug/libarrow-odbc.so \n\
FileUsage=1 \n\
UsageCount=1 \n\
' > /etc/odbcinst.ini
RUN echo $'[ODBC Data Sources] \n\
FlightSQL = FlightSQL Driver \n\
[FlightSQL] \n\
Description = FlightSQL Driver \n\
Driver = FlightSQL \n\
host = host.docker.internal \n\
port = 32010 \n\
user = dremio \n\
password = dremio123 \n\
useEncryption = 0 \n\
' > /root/.odbc.ini
# Enabled gcc 9 as default on bash
RUN echo 'source scl_source enable devtoolset-9' >> ~/.bashrc
WORKDIR /opt/warpdrive