forked from EOSIO/history-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
48 lines (43 loc) · 1.23 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
FROM ubuntu:20.04 as base
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
autoconf2.13 \
build-essential \
cmake \
curl \
git \
libboost-all-dev \
libcurl4-openssl-dev \
libgmp-dev \
libpq-dev \
libpqxx-dev \
libssl-dev \
ninja-build \
openssl \
python3-pkgconfig && \
apt-get clean && \
rm -rf /var/cache/apt/lists/*
FROM base as builder
WORKDIR /root
RUN mkdir /root/history-tools
COPY cmake /root/history-tools/cmake
COPY CMakeLists.txt /root/history-tools
COPY libraries /root/history-tools/libraries
COPY src /root/history-tools/src
COPY unittests /root/history-tools/unittests
RUN mkdir /root/history-tools/build
WORKDIR /root/history-tools/build
RUN cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql .. && \
ninja && \
ctest --output-on-failure
FROM ubuntu:20.04
RUN apt-get update && \
apt-get install -y \
netcat \
openssl \
postgresql-client && \
apt-get clean && \
rm -rf /var/cache/apt/lists/*
COPY --from=builder /root/history-tools/build/fill-pg /usr/local/bin/fill-pg