-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
44 lines (34 loc) · 1.18 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
FROM ubuntu:22.04 AS builder
ARG DEBIAN_FRONTEND=noninteractive
WORKDIR /app
RUN apt-get update && \
apt-get install -y clang-15 \
make \
cmake \
bison \
flex \
git \
ssh \
libssl-dev \
libcrypto++-dev \
libboost-dev \
nlohmann-json3-dev \
uuid-dev \
libsqlite3-dev \
protobuf-compiler && \
ln -s /usr/bin/clang++-15 /usr/bin/clang++ && \
ln -s /usr/bin/clang-15 /usr/bin/clang
COPY . .
RUN cmake -DCMAKE_BUILD_TYPE=Release .
RUN make -j8
RUN mkdir -p /app/ && \
find src -type f -executable -exec cp {} /app/ \;
FROM ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y openssl libuuid1 libcrypto++8 libsqlite3-0 libprotobuf23 libboost1.74 && \
apt-get clean autoclean &&\
apt-get autoremove --yes
# hanami
COPY --from=builder /app/hanami /usr/bin/hanami
CMD [ "hanami" ]