mirror of
https://github.com/aquasecurity/kube-hunter.git
synced 2026-05-17 22:57:25 +00:00
* optimised docker image * use multi-stage image to remove build dependencies from final layer * updated to python 3.7.3 Signed-off-by: Weston Steimel <weston.steimel@gmail.com> * add /etc/ethertypes in final layer Added ebtables and copy /etc/ethertypes to disable warning in verions of scapy with EtherCat functionality. This also fixes misspelling of tcpdump package in build layer. Signed-off-by: Weston Steimel <weston.steimel@gmail.com>
29 lines
561 B
Docker
29 lines
561 B
Docker
FROM python:3.7.3-alpine3.9 as builder
|
|
|
|
RUN apk add --update \
|
|
linux-headers \
|
|
wireshark \
|
|
tcpdump \
|
|
build-base \
|
|
ebtables
|
|
|
|
RUN mkdir -p /kube-hunter
|
|
COPY ./requirements.txt /kube-hunter/.
|
|
RUN pip install -r /kube-hunter/requirements.txt -t /kube-hunter
|
|
|
|
COPY . /kube-hunter
|
|
|
|
FROM python:3.7.3-alpine3.9
|
|
|
|
RUN apk add --update \
|
|
linux-headers \
|
|
wireshark \
|
|
tcpdump
|
|
|
|
COPY --from=builder /kube-hunter /kube-hunter
|
|
COPY --from=builder /etc/ethertypes /etc/ethertypes
|
|
|
|
WORKDIR /kube-hunter
|
|
|
|
ENTRYPOINT ["python", "kube-hunter.py"]
|