Skip to content

Commit 343f906

Browse files
committed
build from commit (version < 2)
1 parent a031a99 commit 343f906

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ ENV VERSION="0.1.1"
66

77
ENV PACKAGES="python3 python3-pip nmap"
88

9+
ENV GIT_COMMIT="438016caea3e975ce2cae34c443d661ee7b66b20"
10+
ENV GIT_ARCHIVE="https://github.com/lopes/netbox-scanner/archive/$GIT_COMMIT.tar.gz"
11+
912
# Install packages
1013
RUN apt-get update \
1114
&& apt-get -y install $PACKAGES \
@@ -15,10 +18,10 @@ RUN apt-get update \
1518
COPY rootfs /
1619

1720
# install netbox-scanner
18-
ADD https://github.com/forkd/netbox-scanner/archive/master.tar.gz /
21+
ADD $GIT_ARCHIVE /
1922
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
2225
RUN pip3 install -r requirements.txt
2326

2427
# Cleanup

rootfs/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ echo 'a9ebfa600ece03fb0005080c3b1184dfe52cea87 /root/.netbox-scanner.conf' | sh
77

88
echo 'Netbox-scanner running..'
99

10-
exec python3 /netbox-scanner/netbox-scanner-master/netbox-scanner/nbscanner
10+
exec python3 /netbox-scanner/netbox-scanner-438016caea3e975ce2cae34c443d661ee7b66b20/netbox-scanner/nbscanner

0 commit comments

Comments
 (0)