File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,10 @@ ENV VERSION="0.1.1"
6
6
7
7
ENV PACKAGES="python3 python3-pip nmap"
8
8
9
+ ENV GIT_USER="lopes"
10
+ ENV GIT_REPO="netbox-scanner"
9
11
ENV GIT_COMMIT="438016caea3e975ce2cae34c443d661ee7b66b20"
10
- ENV GIT_ARCHIVE="https://github.com/lopes/netbox-scanner /archive/$GIT_COMMIT.tar.gz"
12
+ ENV GIT_ARCHIVE="https://github.com/$GIT_USER/$GIT_REPO /archive/$GIT_COMMIT.tar.gz"
11
13
12
14
# Install packages
13
15
RUN apt-get update \
@@ -17,11 +19,12 @@ RUN apt-get update \
17
19
# Copy root filesystem
18
20
COPY rootfs /
19
21
20
- # install netbox-scanner
22
+ # Download source
23
+ WORKDIR /$GIT_REPO
21
24
ADD $GIT_ARCHIVE /
22
- WORKDIR /netbox-scanner
23
- RUN tar xzvf /$GIT_COMMIT.tar.gz
24
- WORKDIR /netbox-scanner/netbox-scanner-$GIT_COMMIT
25
+ RUN tar --strip-component 1 -xzvf /$GIT_COMMIT.tar.gz && rm /$GIT_COMMIT.tar.gz
26
+
27
+ # Install dependencies
25
28
RUN pip3 install -r requirements.txt
26
29
27
30
# Cleanup
Original file line number Diff line number Diff line change @@ -7,4 +7,4 @@ echo 'a9ebfa600ece03fb0005080c3b1184dfe52cea87 /root/.netbox-scanner.conf' | sh
7
7
8
8
echo ' Netbox-scanner running..'
9
9
10
- exec python3 /netbox-scanner/netbox-scanner-438016caea3e975ce2cae34c443d661ee7b66b20/netbox-scanner /nbscanner
10
+ exec python3 /netbox-scanner/netbox-scanner/nbscanner
You can’t perform that action at this time.
0 commit comments