Skip to content

Commit 62f5905

Browse files
committed
remove alpine stage
1 parent 0a0fb40 commit 62f5905

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

Dockerfile

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:12-slim AS netbox-scanner
1+
FROM debian:12-slim AS build
22

33
ARG GIT_USER="lopes"
44
ARG GIT_REPO="netbox-scanner"
@@ -12,10 +12,13 @@ RUN tar --strip-component 1 -xzvf /$GIT_COMMIT.tar.gz && rm /$GIT_COMMIT.tar.gz
1212

1313
COPY rootfs /
1414

15-
# DNS patch
15+
ARG PACKAGES="patch python3-venv nmap"
16+
1617
RUN 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
1922
RUN patch -i /patches/__init__.py.patch /netbox-scanner/nbs/__init__.py
2023
RUN 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
3336
RUN 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
4539
COPY rootfs/run.sh /
46-
COPY --from=netbox-scanner /netbox-scanner /netbox-scanner
4740

4841
# Build final image
4942
FROM scratch

README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ Dockerized version of [netbox-scanner](https://github.com/lopes/netbox-scanner).
88
make
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

1813
1. Goto `Others / Tags` and create a new tag: `nmap`.

0 commit comments

Comments
 (0)