Alberto Planas Dominguez
9a2419ff77
New service, like kiwi_label_helper, but for Dockerfile. OBS-URL: https://build.opensuse.org/request/show/833745 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-docker_label_helper?expand=0&rev=1
25 lines
628 B
Bash
25 lines
628 B
Bash
#!/bin/sh
|
|
set -eu
|
|
tmpdir=$(mktemp -d)
|
|
trap 'rm -rf ${tmpdir}' EXIT
|
|
|
|
script="$(realpath "$(dirname $0)")/docker_label_helper"
|
|
|
|
cd $tmpdir
|
|
|
|
cat >Dockerfile <<EOF
|
|
# labelprefix=org.opensuse.nano
|
|
PREFIXEDLABEL org.opencontainers.image.title="Example container"
|
|
PREFIXEDLABEL org.opencontainers.image.description="This contains nano"
|
|
EOF
|
|
|
|
export BUILD_DIST=
|
|
sh "${script}"
|
|
|
|
diff -u Dockerfile - <<EOF
|
|
LABEL org.opensuse.nano.title="Example container"
|
|
LABEL org.opencontainers.image.title="Example container"
|
|
LABEL org.opensuse.nano.description="This contains nano"
|
|
LABEL org.opencontainers.image.description="This contains nano"
|
|
EOF
|