add multi stage build to netdisco-base

This commit is contained in:
Oliver Gorwits
2018-01-13 20:06:04 +00:00
parent ec2b2bcfa2
commit 2dbb9df735
3 changed files with 66 additions and 19 deletions

View File

@@ -5,11 +5,11 @@ FROM docker.io/netdisco/netdisco-base:${TAG}-base
LABEL org.netdisco.maintainer="The Netdisco Project"
LABEL org.netdisco.version=${TAG}
WORKDIR $NETDISCO_HOME/netdisco-mibs
WORKDIR /home/netdisco/netdisco-mibs
RUN curl -sL https://api.github.com/repos/netdisco/netdisco-mibs/tags | \
jq '.[]|.tarball_url|select(test("tarball/\\d+\\.\\d+$"))' | \
sort -rg | head -n1 | xargs -n1 curl -sL | tar --strip-components=1 -zxf -
WORKDIR $NETDISCO_HOME
WORKDIR /home/netdisco
ENTRYPOINT ["/home/netdisco/bin/netdisco-backend"]
CMD ["foreground"]