1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

docker: improve label handling

This commit is contained in:
Steffen Vogel 2018-05-15 18:59:06 +02:00
parent d45573a536
commit bca235917e
5 changed files with 90 additions and 50 deletions

View file

@ -26,17 +26,11 @@
FROM fedora:27
LABEL \
org.label-schema.schema-version = "1.0" \
org.label-schema.name = "VILLASnode" \
org.label-schema.license = "GPL-3.0" \
org.label-schema.vendor = "Institute for Automation of Complex Power Systems, RWTH Aachen University" \
org.label-schema.author.name = "Steffen Vogel" \
org.label-schema.author.email = "stvogel@eonerc.rwth-aachen.de" \
org.label-schema.description = "A image containing for VILLASnode based on Fedora" \
org.label-schema.url = "http://fein-aachen.org/projects/villas-framework/" \
org.label-schema.vcs-url = "https://git.rwth-aachen.de/VILLASframework/VILLASnode" \
org.label-schema.usage = "https://villas.fein-aachen.org/doc/node-installation.html#node-installation-docker"
ARG GIT_REV=unkown
ARG GIT_BRANCH=unkown
ARG VERSION=unkown
ARG VARIANT=unkown
# Some of the dependencies are only available in our own repo
ADD https://packages.fein-aachen.org/redhat/fein.repo /etc/yum.repos.d/
@ -68,3 +62,19 @@ EXPOSE 80
EXPOSE 443
ENTRYPOINT ["villas"]
LABEL \
org.label-schema.schema-version = "1.0" \
org.label-schema.name = "VILLASnode" \
org.label-schema.license = "GPL-3.0" \
org.label-schema.vcs-ref="$GIT_REV" \
org.label-schema.vcs-branch="$GIT_BRANCH" \
org.label-schema.version="$VERSION" \
org.label-schema.variant="$VARIANT" \
org.label-schema.vendor = "Institute for Automation of Complex Power Systems, RWTH Aachen University" \
org.label-schema.author.name = "Steffen Vogel" \
org.label-schema.author.email = "stvogel@eonerc.rwth-aachen.de" \
org.label-schema.description = "A image containing for VILLASnode based on Fedora" \
org.label-schema.url = "http://fein-aachen.org/projects/villas-framework/" \
org.label-schema.vcs-url = "https://git.rwth-aachen.de/VILLASframework/VILLASnode" \
org.label-schema.usage = "https://villas.fein-aachen.org/doc/node-installation.html#node-installation-docker"

View file

@ -30,17 +30,10 @@
FROM fedora:27
LABEL \
org.label-schema.schema-version="1.0" \
org.label-schema.name="VILLASnode" \
org.label-schema.license="GPL-3.0" \
org.label-schema.vendor="Institute for Automation of Complex Power Systems, RWTH Aachen University" \
org.label-schema.author.name="Steffen Vogel" \
org.label-schema.author.email="stvogel@eonerc.rwth-aachen.de" \
org.label-schema.description="A image containing all build-time dependencies for VILLASnode based on Fedora" \
org.label-schema.url="http://fein-aachen.org/projects/villas-framework/" \
org.label-schema.vcs-url="https://git.rwth-aachen.de/VILLASframework/VILLASnode" \
org.label-schema.usage="https://villas.fein-aachen.org/doc/node-installation.html#node-installation-docker"
ARG GIT_REV=unkown
ARG GIT_BRANCH=unkown
ARG VERSION=unkown
ARG VARIANT=unkown
# Toolchain
RUN dnf -y install \
@ -104,3 +97,19 @@ ENV LD_LIBRARY_PATH /usr/local/lib:/usr/local/lib64
WORKDIR /villas
ENTRYPOINT bash
LABEL \
org.label-schema.schema-version="1.0" \
org.label-schema.name="VILLASnode" \
org.label-schema.license="GPL-3.0" \
org.label-schema.vcs-ref="$GIT_REV" \
org.label-schema.vcs-branch="$GIT_BRANCH" \
org.label-schema.version="$VERSION" \
org.label-schema.variant="$VARIANT" \
org.label-schema.vendor="Institute for Automation of Complex Power Systems, RWTH Aachen University" \
org.label-schema.author.name="Steffen Vogel" \
org.label-schema.author.email="stvogel@eonerc.rwth-aachen.de" \
org.label-schema.description="A image containing all build-time dependencies for VILLASnode based on Fedora" \
org.label-schema.url="http://fein-aachen.org/projects/villas-framework/" \
org.label-schema.vcs-url="https://git.rwth-aachen.de/VILLASframework/VILLASnode" \
org.label-schema.usage="https://villas.fein-aachen.org/doc/node-installation.html#node-installation-docker"

View file

@ -30,17 +30,10 @@
FROM centos:7
LABEL \
org.label-schema.schema-version = "1.0" \
org.label-schema.name = "VILLASnode" \
org.label-schema.license = "GPL-3.0" \
org.label-schema.vendor = "Institute for Automation of Complex Power Systems, RWTH Aachen University" \
org.label-schema.author.name = "Steffen Vogel" \
org.label-schema.author.email = "stvogel@eonerc.rwth-aachen.de" \
org.label-schema.description = "A image containing all build-time dependencies for VILLASnode based on CentOS" \
org.label-schema.url = "http://fein-aachen.org/projects/villas-framework/" \
org.label-schema.vcs-url = "https://git.rwth-aachen.de/VILLASframework/VILLASnode" \
org.label-schema.usage = "https://villas.fein-aachen.org/doc/node-installation.html#node-installation-docker"
ARG GIT_REV=unkown
ARG GIT_BRANCH=unkown
ARG VERSION=unkown
ARG VARIANT=unkown
# Some of the dependencies are only available in our own repo
ADD https://villas.fein-aachen.org/packages/villas.repo /etc/yum.repos.d/
@ -113,3 +106,19 @@ ENV LD_LIBRARY_PATH /usr/local/lib:/usr/local/lib64
WORKDIR /villas
ENTRYPOINT scl enable devtoolset-6 bash
LABEL \
org.label-schema.schema-version="1.0" \
org.label-schema.name="VILLASnode" \
org.label-schema.license="GPL-3.0" \
org.label-schema.vcs-ref="$GIT_REV" \
org.label-schema.vcs-branch="$GIT_BRANCH" \
org.label-schema.version="$VERSION" \
org.label-schema.variant="$VARIANT" \
org.label-schema.vendor="Institute for Automation of Complex Power Systems, RWTH Aachen University" \
org.label-schema.author.name="Steffen Vogel" \
org.label-schema.author.email="stvogel@eonerc.rwth-aachen.de" \
org.label-schema.description="A image containing all build-time dependencies for VILLASnode based on CentOS" \
org.label-schema.url="http://fein-aachen.org/projects/villas-framework/" \
org.label-schema.vcs-url="https://git.rwth-aachen.de/VILLASframework/VILLASnode" \
org.label-schema.usage="https://villas.fein-aachen.org/doc/node-installation.html#node-installation-docker"

View file

@ -32,17 +32,10 @@
FROM ubuntu:xenial
#FROM debian:jessie
LABEL \
org.label-schema.schema-version = "1.0" \
org.label-schema.name = "VILLASnode" \
org.label-schema.license = "GPL-3.0" \
org.label-schema.vendor = "Institute for Automation of Complex Power Systems, RWTH Aachen University" \
org.label-schema.author.name = "Steffen Vogel" \
org.label-schema.author.email = "stvogel@eonerc.rwth-aachen.de" \
org.label-schema.description = "A image containing all build-time dependencies for VILLASnode based on Ubuntu" \
org.label-schema.url = "http://fein-aachen.org/projects/villas-framework/" \
org.label-schema.vcs-url = "https://git.rwth-aachen.de/VILLASframework/VILLASnode" \
org.label-schema.usage = "https://villas.fein-aachen.org/doc/node-installation.html#node-installation-docker"
ARG GIT_REV=unkown
ARG GIT_BRANCH=unkown
ARG VERSION=unkown
ARG VARIANT=unkown
# Toolchain
RUN apt-get update && apt-get install -y \
@ -107,3 +100,19 @@ RUN ln -s /usr/lib64/tc /usr/lib/tc
WORKDIR /villas
ENTRYPOINT bash
LABEL \
org.label-schema.schema-version="1.0" \
org.label-schema.name="VILLASnode" \
org.label-schema.license="GPL-3.0" \
org.label-schema.vcs-ref="$GIT_REV" \
org.label-schema.vcs-branch="$GIT_BRANCH" \
org.label-schema.version="$VERSION" \
org.label-schema.variant="$VARIANT" \
org.label-schema.vendor="Institute for Automation of Complex Power Systems, RWTH Aachen University" \
org.label-schema.author.name="Steffen Vogel" \
org.label-schema.author.email="stvogel@eonerc.rwth-aachen.de" \
org.label-schema.description="A image containing all build-time dependencies for VILLASnode based on Ubuntu" \
org.label-schema.url="http://fein-aachen.org/projects/villas-framework/" \
org.label-schema.vcs-url="https://git.rwth-aachen.de/VILLASframework/VILLASnode" \
org.label-schema.usage="https://villas.fein-aachen.org/doc/node-installation.html#node-installation-docker"

View file

@ -54,13 +54,16 @@ $(DOCKER_TARGETS): docker-%: $(BUILDDIR)/packaging/docker/Image.%
# id to an file. Make is using the modification timestamp of this file and the Dockerfile
# to determine when the image needs to be rebuild.
$(BUILDDIR)/packaging/docker/Image.%: packaging/docker/Dockerfile.% | $(BUILDDIR)/packaging/docker/
$(DOCKER) build --pull \
$(DOCKER) build \
--file $< --iidfile $@ \
--tag $(DOCKER_IMAGE)-$*:$(DOCKER_TAG) \
--label org.label-schema.vcs-ref="$(GIT_REV)" \
--label org.label-schema.vcs-branch="$(GIT_BRANCH)" \
--label org.label-schema.version="$(VERSION)" \
--label org.label-schema.variant="$(VARIANT)" \
$(SRCDIR)
--tag $(DOCKER_IMAGE)-$*:latest \
--build-arg BUILDER_IMAGE=$(DOCKER_IMAGE)-dev:$(DOCKER_TAG) \
--build-arg DOCKER_TAG=${DOCKER_TAG} \
--build-arg GIT_BRANCH=${GIT_BRANCH} \
--build-arg GIT_REV=${GIT_REV} \
--build-arg VERSION=${VERSION} \
--build-arg VARIANT=${VARIANT} \
$(DOCKER_OPTS) $(SRCDIR)
.PHONY: $(DOCKER_TARGETS) $(DOCKER_RUN_TARGETS) $(DOCKER_DEPLOY_TARGETS)