always build the latest tag
This commit is contained in:
@@ -1,20 +1,16 @@
|
||||
# vim: ft=Dockerfile
|
||||
FROM docker.io/postgres:9.6.6-alpine
|
||||
|
||||
ARG TAG
|
||||
ENV TAG ${TAG:-master}
|
||||
|
||||
RUN apk add --no-cache \
|
||||
curl \
|
||||
jq \
|
||||
tar
|
||||
|
||||
WORKDIR /var/lib/postgresql/netdisco-sql
|
||||
RUN curl -sL "https://api.github.com/repos/netdisco/netdisco/tarball/${TAG}" | \
|
||||
tar --wildcards -zt '*App-Netdisco-DB-*' | xargs -n1 basename | sort -n -t '-' -k4 | \
|
||||
while read file; \
|
||||
do curl -sLO "https://raw.githubusercontent.com/netdisco/netdisco/${TAG}/share/schema_versions/$file"; \
|
||||
done && \
|
||||
RUN curl -s https://api.github.com/repos/netdisco/netdisco/tags | \
|
||||
jq '.[]|.name|select(test("^\\d+\\.\\d+$"))|"https://api.github.com/repos/netdisco/netdisco/tarball/"+.' | \
|
||||
sort -rg | head -n1 | xargs -n1 curl -sL | \
|
||||
tar --wildcards --strip-components=3 -zx '*App-Netdisco-DB-*' && \
|
||||
curl -sLO "https://raw.githubusercontent.com/netdisco/upstream-sources/master/ieee/oui.sql" && \
|
||||
curl -sLO "https://raw.githubusercontent.com/netdisco/netdisco/master/lib/App/Netdisco/DB.pm"
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
docker build --build-arg TAG=$SOURCE_BRANCH -t $IMAGE_NAME .
|
||||
Reference in New Issue
Block a user