-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.flex
More file actions
30 lines (21 loc) · 1.13 KB
/
Dockerfile.flex
File metadata and controls
30 lines (21 loc) · 1.13 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
FROM ghcr.io/philips-software/amp-devcontainer-cpp:v6.0.2@sha256:36afaaa5ba4bc4e9bb471012db9733c26a210e315ddb33600f73bb9532b02a25 AS builder
HEALTHCHECK NONE
#checkov:skip=CKV_DOCKER_3: this container needs to run as root
WORKDIR /workspace
COPY . /workspace
RUN cmake --preset flex \
&& cmake --build --preset flex
RUN apt-get update && apt-get install -y --no-install-recommends net-tools
FROM scratch
HEALTHCHECK --interval=5s --retries=100 CMD netstat -ltn | grep -c ":1234"; if [ 0 != $? ]; then exit 1; fi;
WORKDIR /flex
COPY --from=builder /workspace/build/flex/postmaster/flex/postmaster.flex /flex/
COPY --from=builder /lib/x86_64-linux-gnu/libc.so.6 /lib/x86_64-linux-gnu/libc.so.6
COPY --from=builder /bin/sh /bin/sh
COPY --from=builder /usr/bin/netstat /usr/bin/netstat
COPY --from=builder /usr/bin/grep /usr/bin/grep
COPY --from=builder /lib/x86_64-linux-gnu/libselinux.so.1 /lib/x86_64-linux-gnu/libselinux.so.1
COPY --from=builder /lib/x86_64-linux-gnu/libpcre2-8.so.0 /lib/x86_64-linux-gnu/libpcre2-8.so.0
COPY --from=builder /lib64/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2
ENTRYPOINT ["/flex/postmaster.flex"]
CMD ["--help"]