-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
executable file
·25 lines (25 loc) · 986 Bytes
/
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
FROM ubuntu:20.04
MAINTAINER Maximilian E. Schüle <[email protected]>
ENV DEBIAN_FRONTEND=noninteractive
# how many cores to use for compilation
ARG BUILD_CORES
# update
RUN apt-get update
# Install some tools
RUN apt-get install -y cmake g++ git llvm-7 libboost1.71-all-dev
## Install pistache
RUN cd /tmp/ && git clone https://github.com/oktal/pistache.git && cd pistache && git submodule update --init && \
mkdir build && cd build && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release .. && make -j${BUILD_CORES} && make install && \
LD_LIBRARY_PATH=/usr/local/lib && export LD_LIBRARY_PATH && ldconfig -v
# Run the rest as non root user
RUN useradd -ms /bin/bash dockeruser
USER dockeruser
WORKDIR /home/dockeruser
# copy work dir
RUN mkdir ./tardisdb
COPY --chown=dockeruser . ./tardisdb/
# Install tardisdb
RUN cd ./tardisdb && rm -rf build && mkdir build && cd ./build && cmake .. && make -j${BUILD_CORES}
# Run
EXPOSE 5000
CMD ["/home/dockeruser/tardisdb/build/server"]