/
ubuntu.dockerfile
59 lines (43 loc) · 1.5 KB
/
ubuntu.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
# This Source Code Form is subject to the terms of the Mozilla
# Public License, v. 2.0. If a copy of the MPL was not
# distributed with this file, You can obtain one at
# https://mozilla.org/MPL/2.0/.
#
# Copyright 1997 - July 2008 CWI, August 2008 - 2023 MonetDB B.V.
FROM ubuntu:20.04 as build
ARG BRANCH=default
ARG BUILD_THREADS=4
ENV DEBIAN_FRONTEND noninteractve
# install monetdb build dependencies
RUN apt-get update && \
apt-get install -y cmake bison libpcre3-dev libssl-dev curl python3 && \
rm -rf /var/lib/apt/lists/*
# download and extract monetdb
WORKDIR /tmp
RUN curl -o MonetDB.tar.bz2 https://www.monetdb.org/hg/MonetDB/archive/${BRANCH}.tar.bz2
RUN tar jxf MonetDB.tar.bz2
RUN mkdir /tmp/MonetDB-${BRANCH}/build
WORKDIR /tmp/MonetDB-${BRANCH}/build
RUN cmake .. \
-DWITH_CRYPTO=OFF \
-DINT128=ON \
-DPY3INTEGRATION=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DASSERT=OFF \
-DSTRICT=OFF \
-DRINTEGRATION=OFF
RUN cmake --build . -j ${BUILD_THREADS}
RUN cmake --build . --target install
FROM ubuntu:20.04 as runtime
# install monetdb build dependencies
RUN apt-get update && \
apt-get install -y python3-pip libpcre3 libssl1.1 && \
rm -rf /var/lib/apt
RUN pip3 install --no-cache --upgrade pip pytest numpy pandas mypy pycodestyle
RUN rm -rf /usr/local
COPY --from=build /usr/local /usr/local
# add shared libraries to wheels
ENV LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:/usr/local/lib"
COPY scripts/entrypoint.sh /usr/local/bin
EXPOSE 50000
CMD [ "entrypoint.sh" ]