Parcourir la source

Merge pull request #496 from rfdrake/develop

fix for Dockerfile
Jeremy Stretch il y a 8 ans
Parent
commit
14a908bf66
1 fichiers modifiés avec 4 ajouts et 3 suppressions
  1. 4 3
      Dockerfile

+ 4 - 3
Dockerfile

@@ -2,9 +2,10 @@ FROM python:2.7-wheezy
 
 WORKDIR /opt/netbox
 
-ADD . /opt/netbox
-RUN git clone --depth 1 https://github.com/digitalocean/netbox.git -b master . \
-RUN	pip install gunicorn==17.5 && pip install -r requirements.txt
+ARG BRANCH=master
+ARG URL=https://github.com/digitalocean/netbox.git
+RUN git clone --depth 1 $URL -b $BRANCH .  && \
+	pip install gunicorn==17.5 && pip install -r requirements.txt
 
 ADD docker/docker-entrypoint.sh /docker-entrypoint.sh
 ADD netbox/netbox/configuration.docker.py /opt/netbox/netbox/netbox/configuration.py