-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
57 lines (43 loc) · 1.25 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
# KeyDB
FROM debian:bullseye AS keydb-compiler
WORKDIR /usr/local/src
COPY ./datamkown.c ./
RUN VERSION="6.3.4" && \
apt-get update && apt-get install -y \
build-essential \
nasm \
autotools-dev \
autoconf \
libjemalloc-dev \
tcl tcl-dev \
uuid-dev \
libssl-dev \
libcurl4-openssl-dev \
libbz2-dev \
libzstd-dev \
liblz4-dev \
libsnappy-dev \
wget && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
gcc datamkown.c -o ./datamkown && chmod ug+s ./datamkown && \
wget "https://github.com/EQ-Alpha/KeyDB/archive/refs/tags/v${VERSION}.tar.gz" && \
tar xvf "v${VERSION}.tar.gz" && \
cd "KeyDB-${VERSION}" && \
make BUILD_TLS=yes && \
cp src/keydb-* /usr/local/bin/
#####################
# primary container #
#####################
FROM node:lts-bullseye-slim
WORKDIR /usr/local/src
EXPOSE 6379/tcp
STOPSIGNAL SIGTERM
COPY --from=keydb-compiler /usr/local/bin/keydb-server /usr/local/bin/keydb-server
COPY --from=keydb-compiler /usr/local/bin/keydb-cli /usr/local/bin/keydb-cli
COPY --from=keydb-compiler /usr/local/src/datamkown /usr/local/bin/datamkown
COPY . .
RUN apt-get update && apt-get install -y libcurl4 libatomic1 iproute2 && \
npm install
HEALTHCHECK CMD node ./healthcheck.js
ENTRYPOINT ["node", "./index.js"]