File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ ENV VERSION="0.1.1"
6
6
7
7
ENV PACKAGES="python3 python3-pip nmap"
8
8
9
+ ENV GIT_COMMIT="438016caea3e975ce2cae34c443d661ee7b66b20"
10
+ ENV GIT_ARCHIVE="https://github.com/lopes/netbox-scanner/archive/$GIT_COMMIT.tar.gz"
11
+
9
12
# Install packages
10
13
RUN apt-get update \
11
14
&& apt-get -y install $PACKAGES \
@@ -15,10 +18,10 @@ RUN apt-get update \
15
18
COPY rootfs /
16
19
17
20
# install netbox-scanner
18
- ADD https://github.com/forkd/netbox-scanner/archive/master.tar.gz /
21
+ ADD $GIT_ARCHIVE /
19
22
WORKDIR /netbox-scanner
20
- RUN tar xzvf /master .tar.gz
21
- WORKDIR /netbox-scanner/netbox-scanner-master
23
+ RUN tar xzvf /$GIT_COMMIT .tar.gz
24
+ WORKDIR /netbox-scanner/netbox-scanner-$GIT_COMMIT
22
25
RUN pip3 install -r requirements.txt
23
26
24
27
# 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-master /netbox-scanner/nbscanner
10
+ exec python3 /netbox-scanner/netbox-scanner-438016caea3e975ce2cae34c443d661ee7b66b20 /netbox-scanner/nbscanner
You can’t perform that action at this time.
0 commit comments