File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change 1
- FROM debian:12-slim as netbox
1
+ FROM debian:12-slim as netbox-scanner
2
2
3
3
ARG GIT_USER="lopes"
4
4
ARG GIT_REPO="netbox-scanner"
@@ -33,22 +33,17 @@ ENV PATH="$VIRTUAL_ENV/bin:$PATH"
33
33
RUN pip3 install --no-cache-dir -r requirements.txt
34
34
35
35
# Build image
36
- FROM debian:12-slim as build
36
+ FROM alpine:3 as build
37
37
38
- ARG PACKAGES="nmap python3"
38
+ # sha256sum --> coreutils
39
+ ARG PACKAGES="nmap python3 bash coreutils"
39
40
40
- SHELL ["/bin/bash" , "-o" , "pipefail" , "-c" ]
41
-
42
- # Install packages
43
- ARG DEBIAN_FRONTEND=noninteractive
44
- RUN apt-get update \
45
- && apt-get -y upgrade \
46
- && apt-get -y install $PACKAGES \
47
- && rm -rf /var/lib/apt/lists/*
41
+ RUN apk upgrade --no-cache \
42
+ && apk add --no-cache $PACKAGES
48
43
49
44
# Copy necessary files
50
45
COPY rootfs/run.sh /
51
- COPY --from=netbox /netbox-scanner /netbox-scanner
46
+ COPY --from=netbox-scanner /netbox-scanner /netbox-scanner
52
47
53
48
# Build final image
54
49
FROM scratch
You can’t perform that action at this time.
0 commit comments