File: Dockerfile

package info (click to toggle)
portsentry 2.0.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,404 kB
  • sloc: ansic: 6,481; sh: 920; perl: 18; makefile: 5
file content (22 lines) | stat: -rw-r--r-- 926 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM debian:stable AS builder
RUN apt update && apt install -y build-essential libpcap-dev cmake git
WORKDIR /build
COPY . .
RUN ./build.sh clean
RUN CMAKE_OPTS="-D SYSTEMD_SYSTEM_UNIT_DIR=/lib/systemd/system" ./build.sh release
RUN cpack --config release/CPackConfig.cmake -G DEB
RUN cpack --config release/CPackConfig.cmake -G TXZ

FROM scratch AS export
COPY --from=builder /build/release/portsentry /portsentry
COPY --from=builder /build/portsentry-*.deb /
COPY --from=builder /build/portsentry-*.tar.xz /

FROM debian:stable
RUN apt update && apt install -y libpcap0.8t64
RUN mkdir -p /etc/portsentry
RUN mkdir -p /var/run/portsentry
COPY --from=builder /build/release/portsentry /usr/local/sbin/portsentry
COPY --from=builder /build/examples/portsentry.conf /etc/portsentry/portsentry.conf
COPY --from=builder /build/examples/portsentry.ignore /etc/portsentry/portsentry.ignore
ENTRYPOINT ["/usr/local/sbin/portsentry"]