-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDockerfile.debian
36 lines (26 loc) · 1.16 KB
/
Dockerfile.debian
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
FROM debian:bullseye-slim
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get -qq install clang cmake git openssl libssl-dev libhiredis-dev gdb bash vim psmisc procps htop curl sudo \
libspdlog-dev libfmt-dev ninja-build
RUN mkdir -p /usr/src/redis-plus-plus && cd /usr/src/redis-plus-plus && \
git clone https://github.com/sewenew/redis-plus-plus.git . && \
git checkout tags/1.1.1 && \
mkdir compile && cd compile && cmake -GNinja -DCMAKE_BUILD_TYPE=Debug .. && \
ninja && ninja install
RUN mkdir -p /usr/src/eventhub
WORKDIR /usr/src/eventhub
COPY . .
RUN mkdir -p build && cd build && \
cmake -DSKIP_TESTS=1 -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo .. && \
ninja && \
cp -a eventhub /usr/bin/eventhub
WORKDIR /tmp
RUN addgroup --system eventhub && \
adduser --system --ingroup eventhub --no-create-home --home /tmp --shell /bin/false eventhub && \
echo "eventhub ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
mkdir -p /tmp/coredumps; chown -R eventhub:eventhub /tmp/coredumps
RUN apt-get -qq remove clang cmake git ninja-build && \
apt-get -qq -f autoremove
USER eventhub
ENTRYPOINT [ "/usr/bin/eventhub" ]