-
Notifications
You must be signed in to change notification settings - Fork 208
/
Dockerfile
90 lines (72 loc) · 2.3 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# SPDX-License-Identifier: BSD-3-Clause
FROM ubuntu:22.04 AS builder
LABEL vendor="pkumod"
LABEL description="gStore RDF Database Engine"
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
libboost-regex-dev \
libboost-system-dev \
libboost-thread-dev \
libboost-system-dev \
curl \
libcurl4 \
libcurl4-openssl-dev \
libssl-dev \
libzmq3-dev \
pkg-config \
wget \
zlib1g-dev \
uuid-dev \
libjemalloc-dev \
libreadline-dev
RUN mkdir -p /src
WORKDIR /usr/src/gstore
# Compile gStore dependencies
COPY tools/ /usr/src/gstore/tools
COPY makefile /usr/src/gstore/
RUN mkdir -p lib && make pre
# Copy gStore source code; run `make tarball` to generate this file
ADD gstore.tar.gz /usr/src/gstore
RUN make
FROM ubuntu:22.04 AS runtime
RUN apt-get update && apt-get install -y \
libboost-regex1.74.0 \
libboost-system1.74.0 \
libboost-thread1.74.0 \
libcurl4 \
libssl3 \
libzmq5 \
uuid-runtime \
libjemalloc2 \
libreadline8 \
libopenmpi3 \
coreutils \
gcc \
g++ \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/src/gstore/bin/ /gstore/bin/
COPY --from=builder /usr/src/gstore/lib/ /gstore/lib/
COPY --from=builder /usr/src/gstore/data/ /gstore/data/
COPY --from=builder /usr/src/gstore/backups/ /gstore/backups/
COPY --from=builder /usr/src/gstore/logs/ /gstore/logs/
COPY --from=builder /usr/src/gstore/.tmp/ /gstore/.tmp/
# configure file
COPY --from=builder /usr/src/gstore/Query/ /gstore/Query/
COPY --from=builder /usr/src/gstore/Database/ /gstore/Database/
COPY --from=builder /usr/src/gstore/backup.json /gstore/
COPY --from=builder /usr/src/gstore/init.conf /gstore/
COPY --from=builder /usr/src/gstore/conf.ini /gstore/
COPY --from=builder /usr/src/gstore/ipAllow.config /gstore/
COPY --from=builder /usr/src/gstore/ipDeny.config /gstore/
COPY --from=builder /usr/src/gstore/slog.properties /gstore/
COPY --from=builder /usr/src/gstore/slog.stdout.properties /gstore/
COPY docker-entrypoint.sh /
WORKDIR /gstore/
VOLUME [ "/gstore/" ]
RUN echo "* - nofile 65535" >> /etc/security/limits.conf \
&& echo "* - noproc 65535" >> /etc/security/limits.conf
EXPOSE 9000
ENTRYPOINT [ "sh", "/docker-entrypoint.sh" ]
#CMD [ "/usr/local/bin/ghttp" ]