-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
42 lines (31 loc) · 951 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM ubuntu:latest as build-deps
SHELL ["/bin/bash", "-c"]
# TODO: merge into single RUN
RUN apt update
RUN apt -y install build-essential
RUN apt -y install cmake
RUN apt -y install gdb
RUN apt -y install git
RUN apt -y install libctemplate-dev
RUN apt -y install libgmock-dev
RUN apt -y install libgtest-dev
RUN apt -y install libpg-query-dev
RUN apt -y install libpqxx-dev
RUN apt -y install libprotobuf-c-dev
RUN apt -y install libprotobuf-dev
RUN apt -y install nlohmann-json3-dev
RUN apt -y install pkg-config
RUN apt -y install protobuf-compiler
RUN apt -y install valgrind
FROM build-deps as build
COPY . /src
WORKDIR /src
RUN mkdir build \
&& cd build \
&& cmake -DBUILD_SHARED_LIBS=OFF .. \
&& make
FROM ubuntu:latest as runtime
RUN mkdir /usr/local/pg-fort
COPY --from=build /src/build/pg-fort /usr/local/pg-fort/pg-fort
WORKDIR /usr/local/pg-fort
ENTRYPOINT [ "./pg-fort" ]