-
Notifications
You must be signed in to change notification settings - Fork 242
/
Dockerfile
36 lines (29 loc) · 1.2 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
FROM ubuntu:20.04
# Install tools needed for development
RUN apt update && \
apt upgrade --yes && \
apt install --yes build-essential cython3 git libssl-dev m4 python3-pip
# Copy needed source
RUN mkdir /src
ADD CMakeLists.txt FBGenCMakeBuildInfo.cmake ThriftLibrary.cmake /src/
COPY build /src/build
COPY openr /src/openr
COPY example_openr.conf /etc/openr.conf
# Build OpenR + Dependencies via cmake
RUN cd /src && build/build_openr.sh && chmod 644 /etc/openr.conf
RUN mkdir /opt/bin && cp /src/build/docker_openr_helper.sh /opt/bin
# Install `breeze` OpenR CLI
RUN apt install g++-10 --yes # We need g++-10 or higher for coroutines which are used in folly::coro
# TODO Move these files into build/
COPY cython_compile.py /src/build/cython_compile.py
RUN git clone https://github.com/cython/cython
RUN cd /src && build/build_breeze.sh
RUN cp -r /src/build/lib.linux-x86_64-3.8 /breeze-build
# Cleanup all we can to keep container as lean as possible
# TODO: We can use Dockerfile stages instead
RUN apt remove --yes build-essential git libssl-dev m4 && \
apt autoremove --yes && \
rm -rf /src /tmp/* /var/lib/apt/lists/*
CMD ["/opt/bin/docker_openr_helper.sh"]
# Expose OpenR Thrift port
EXPOSE 2018/tcp