]> git.ipfire.org Git - thirdparty/lldpd.git/blob - Dockerfile
build: bump actions/download-artifact from 3 to 4
[thirdparty/lldpd.git] / Dockerfile
1 FROM alpine:latest AS build
2 RUN apk add autoconf automake libtool \
3 libevent-dev libxml2-dev jansson-dev \
4 readline-dev libcap-dev bsd-compat-headers \
5 alpine-sdk
6 WORKDIR /build
7 COPY . .
8 RUN ./autogen.sh
9 RUN ./configure \
10 --prefix=/usr/local \
11 --sysconfdir=/etc \
12 --enable-pie \
13 --enable-hardening \
14 --without-embedded-libevent \
15 --without-snmp \
16 --with-xml \
17 --with-privsep-user=_lldpd \
18 --with-privsep-group=_lldpd \
19 --with-privsep-chroot=/run/lldpd \
20 --with-lldpd-ctl-socket=/run/lldpd.socket \
21 --with-lldpd-pid-file=/run/lldpd.pid
22 RUN make
23 RUN make install DESTDIR=/lldpd
24
25 FROM alpine:latest
26 RUN apk add libevent libxml2 jansson readline libcap \
27 && addgroup -S _lldpd \
28 && adduser -S -G _lldpd -D -H -g "lldpd user" _lldpd
29 COPY --from=build /lldpd /
30 VOLUME /etc/lldpd.d
31 ENTRYPOINT ["lldpd", "-d"]
32 CMD []
33