Adding REF to GitHub repo HEAD for cache busting

After installing requirements, check if  HEAD has changed and bust cache for RUN instruction for wget  archive
This commit is contained in:
Robert Ellegate 2019-05-23 11:20:39 -04:00
parent 821fb5f36e
commit e33a2d2c0a
No known key found for this signature in database
GPG Key ID: 24D4785AF6ACD19A
1 changed files with 3 additions and 0 deletions

View File

@ -36,6 +36,9 @@ ARG REQUIREMENTS_URL=https://raw.githubusercontent.com/digitalocean/netbox/$BRAN
ADD ${REQUIREMENTS_URL} requirements.txt
RUN pip install -r requirements.txt
ARG REF_URL=https://api.github.com/repos/digitalocean/netbox/git/refs/heads/$BRANCH
ADD ${REF_URL} version.json
ARG URL=https://github.com/digitalocean/netbox/archive/$BRANCH.tar.gz
RUN wget -q -O - "${URL}" | tar xz \
&& mv netbox* netbox