From 8f34b6b0b963a502f8e5a00554b98fb20dda1adc Mon Sep 17 00:00:00 2001 From: Robert Drake Date: Sun, 21 Aug 2016 23:48:27 -0400 Subject: [PATCH] fix for Dockerfile It was hard to test with the old syntax. It was cloning the "master" branch, so trying to test a development change was difficult. I believe I've fixed it so that the "master" branch and "develop" branch can use the same Dockerfile options. You override which branch it pulls by setting a build-args variable, either via docker-compose or in the docker build options. --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index fc05a4507..2cf8b9294 100644 --- a/Dockerfile +++ b/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