-
Notifications
You must be signed in to change notification settings - Fork 5
/
alpine.Dockerfile
41 lines (30 loc) · 810 Bytes
/
alpine.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
FROM alpine:3.17 AS build
RUN apk add --no-cache build-base cmake ninja git linux-headers
COPY . /src/
ENV GITHUB_ACTIONS=true
RUN mkdir /build \
&& cmake \
-G Ninja -S /src -B /build \
-DCMAKE_BUILD_TYPE=Release \
-DNO_BUILDCACHE=ON \
-DPPR_MIMALLOC=ON \
&& cmake \
--build /build \
--target ppr-preprocess ppr-backend footrouting \
&& install -t /ppr -D \
/build/ppr-preprocess \
/build/ppr-backend \
/build/footrouting \
&& cp -r /src/ui /ppr/ \
&& rm -rf /build
FROM alpine:3.17
RUN apk add --no-cache libstdc++ tini \
&& addgroup -S ppr \
&& adduser -S ppr -G ppr
COPY --from=build /ppr /ppr
WORKDIR /ppr
USER ppr
EXPOSE 8000
VOLUME ["/data"]
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["/ppr/ppr-backend", "-c", "/data/config.ini"]