https://github.com/52north/label-spec

Examples for 52°North Image and Container Label Specification.

https://github.com/52north/label-spec

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.8%) to scientific vocabulary

Keywords

container docker image label
Last synced: 5 months ago · JSON representation

Repository

Examples for 52°North Image and Container Label Specification.

Basic Info
Statistics
  • Stars: 2
  • Watchers: 2
  • Forks: 0
  • Open Issues: 3
  • Releases: 0
Topics
container docker image label
Created about 5 years ago · Last pushed about 1 year ago
Metadata Files
Readme License

README.md

Example for 52°North Image and Container Label Specification

The specification for image and Container labels specifies a minimal set of labels required for

  • images
  • container
  • volumes

Details can be found in our wiki. Please feel invited to provide comments.

This repository provides pratical instructions how to implement this specification.

Instructions

  • Build the image

Just checkout this repository and perform the following command line:

docker build -t 52n-label-test:latest --build-arg GIT_COMMIT=$(git rev-parse -q --verify HEAD) --build-arg BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") . * Verify the labels

docker inspect --format='{{range $k, $v := .ContainerConfig.Labels}} {{- printf "%s = \"%s\"\n" $k $v -}} {{end}}' 52n-label-test:latest

The result should look like this:

maintainer = "Jürrens, Eike Hinderk <e.h.juerrens@52north.org>" org.opencontainers.image.authors = "Jürrens, Eike Hinderk <e.h.juerrens@52north.org>" org.opencontainers.image.created = "1952-08-23T11:09:31Z" org.opencontainers.image.description = "Example for labelling images and container following https://wiki.52north.org/Documentation/ImageAndContainerLabelSpecification" org.opencontainers.image.licenses = "GPL-3.0-or-later" org.opencontainers.image.ref.name = "52north/label-example-1.0.0" org.opencontainers.image.revision = "5da05aca171acf7fd70183271e347c31d87a5f19" org.opencontainers.image.title = "52°North Label Example Image" org.opencontainers.image.url = "https://github.com/52North/label-spec.git" org.opencontainers.image.vendor = "52°North GmbH" org.opencontainers.image.version = "1.0.0"

  • Start container and add the required labels

Check the required labels for running containers and add them to your run command:

bash docker run \ --detach \ --name 52n-label-test \ --label org.52north.contact="e.h.juerrens+52n-label-test-on-$(hostname -f)@52north.org" \ --label org.52north.context="local testing" \ --label org.52north.end-of-life="$(date -d '+1 hour' -u +"%Y-%m-%dT%H:%M:%SZ")" \ 52n-label-test:latest

For a coloured output, use jq to show the labels of the container:

docker inspect 52n-label-test | jq -r '.[0].Config.Labels'

json { "maintainer": "Jürrens, Eike Hinderk <e.h.juerrens@52north.org>", "org.52north.contact": "e.h.juerrens+52n-label-test-on-makatea@52north.org", "org.52north.context": "local testing", "org.52north.end-of-life": "1952-08-23T12:54:27Z", "org.opencontainers.image.authors": "Jürrens, Eike Hinderk <e.h.juerrens@52north.org>", "org.opencontainers.image.created": "2020-12-03T11:41:15Z", "org.opencontainers.image.description": "Example for labelling images and container following https://wiki.52north.org/Documentation/ImageAndContainerLabelSpecification", "org.opencontainers.image.licenses": "GPL-3.0-or-later", "org.opencontainers.image.ref.name": "52north/label-example-1.0.0", "org.opencontainers.image.revision": "5da05aca171acf7fd70183271e347c31d87a5f19", "org.opencontainers.image.title": "52°North Label Example Image", "org.opencontainers.image.url": "https://github.com/52North/label-spec.git", "org.opencontainers.image.vendor": "52°North GmbH", "org.opencontainers.image.version": "1.0.0" }

At the end, do not forget to stop and remove the container, or it will print dots for ever:

docker kill 52n-label-test && docker rm 52n-label-test

Owner

  • Name: 52°North Spatial Information Research GmbH
  • Login: 52North
  • Kind: organization
  • Email: info@52north.org
  • Location: Münster

Advancing spatial information infrastructures to foster open science

GitHub Events

Total
  • Issue comment event: 2
  • Push event: 1
Last Year
  • Issue comment event: 2
  • Push event: 1

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 3
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • EHJ-52n (3)
Pull Request Authors
Top Labels
Issue Labels
documentation (3) enhancement (3)
Pull Request Labels

Dependencies

Dockerfile docker
  • alpine latest build