-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
54 lines (45 loc) · 1.2 KB
/
Copy pathDockerfile
File metadata and controls
54 lines (45 loc) · 1.2 KB
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
FROM debian:bookworm AS builder
RUN apt-get update && apt-get install -y \
build-essential \
mold \
libcurl4-openssl-dev \
libseccomp-dev \
libcap-ng-dev \
libqalculate-dev \
cmake \
pkg-config
WORKDIR /qalculate-helper
COPY include include
COPY src src
COPY CMakeLists.txt .
WORKDIR /qalculate-helper/build
RUN cmake -DUID=1000 -DSECCOMP=True -DSECCOMP_ALLOW_CLONE=True -DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=mold" -DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=mold" ..
RUN make
RUN chmod +x qalculate-helper
FROM debian:bookworm
RUN apt-get update && apt-get install -y libcurl4 \
libmpfr6 \
libgmp10 \
libxml2 \
libcap2-bin \
libqalculate22
RUN addgroup \
--gid 1000 \
qalculate
RUN adduser \
--disabled-password \
--gecos "" \
--home "/nonexistent" \
--shell "/sbin/nologin" \
--no-create-home \
--uid 1000 \
--gid 1000 \
qalculate
RUN pwck -q
RUN grpck
COPY --from=builder --chown=1000:1000 /qalculate-helper/build/qalculate-helper /qalculate-helper
RUN chmod 6100 /qalculate-helper
RUN echo "cap_setgid+ep cap_setpcap+ep" | setcap - qalculate-helper
RUN apt-get clean
RUN /qalculate-helper update
ENTRYPOINT [ "/qalculate-helper" ]