File tree Expand file tree Collapse file tree 2 files changed +6
-18
lines changed Expand file tree Collapse file tree 2 files changed +6
-18
lines changed Original file line number Diff line number Diff line change 1- FROM debian:12-slim AS netbox-scanner
1+ FROM debian:12-slim AS build
22
33ARG GIT_USER="lopes"
44ARG GIT_REPO="netbox-scanner"
@@ -12,10 +12,13 @@ RUN tar --strip-component 1 -xzvf /$GIT_COMMIT.tar.gz && rm /$GIT_COMMIT.tar.gz
1212
1313COPY rootfs /
1414
15- # DNS patch
15+ ARG PACKAGES="patch python3-venv nmap"
16+
1617RUN apt-get update \
17- && apt-get -y --no-install-recommends install patch python3-venv \
18+ && apt-get -y --no-install-recommends install $PACKAGES \
1819&& rm -rf /var/lib/apt/lists/*
20+
21+ # DNS patch
1922RUN patch -i /patches/__init__.py.patch /netbox-scanner/nbs/__init__.py
2023RUN patch -i /patches/nmap.py.patch /netbox-scanner/nbs/nmap.py
2124
@@ -32,18 +35,8 @@ ENV PATH="$VIRTUAL_ENV/bin:$PATH"
3235# Install dependencies
3336RUN pip3 install --no-cache-dir -r requirements.txt
3437
35- # Build image
36- FROM alpine:3 AS build
37-
38- # sha256sum --> coreutils
39- ARG PACKAGES="nmap python3 bash coreutils"
40-
41- RUN apk upgrade --no-cache \
42- && apk add --no-cache $PACKAGES
43-
4438# Copy necessary files
4539COPY rootfs/run.sh /
46- COPY --from=netbox-scanner /netbox-scanner /netbox-scanner
4740
4841# Build final image
4942FROM scratch
Original file line number Diff line number Diff line change @@ -8,11 +8,6 @@ Dockerized version of [netbox-scanner](https://github.com/lopes/netbox-scanner).
88make
99```
1010
11- ## Setup Netbox 2.x
12-
13- 1 . Goto ` Organization / Tags ` and create a new tag: ` nmap ` .
14- 1 . Goto ` Profile / API Tokens ` and create a token, for use with netbox-scanner.
15-
1611## Setup Netbox 3.x
1712
18131 . Goto ` Others / Tags ` and create a new tag: ` nmap ` .
You can’t perform that action at this time.
0 commit comments