Closed mikaello closed 1 year ago
@mikaello like this? https://github.com/mendhak/docker-http-https-echo/pull/46
I've also pushed a test tag :issue45-labels
if you want to test.
@mikaello like this? #46
Exactly (or almost, minor change commented in PR), thanks a lot for your swift reply!
I've also pushed a test tag :issue45-labels if you want to test.
Currently the labels are not in the final build, as mentioned in the PR:
$ docker inspect mendhak/http-https-echo:issue45-labels --format '{{ .Config.Labels }}'
map[]
Ah thanks for that command. OK I pushed a different tag now,
docker pull mendhak/http-https-echo:labels
docker inspect lscr.io/linuxserver/transmission --format '{{ .Config.Labels }}'
And this is the output I get
map[org.opencontainers.image.description:Docker image that echoes request data as JSON; listens on HTTP/S, with various extra features, useful for debugging. org.opencontainers.image.documentation:https://github.com/mendhak/docker-http-https-echo/blob/master/README.md org.opencontainers.image.licenses:MIT org.opencontainers.image.source:https://github.com/mendhak/docker-http-https-echo org.opencontainers.image.title:http-https-echo org.opencontainers.image.url:https://github.com/mendhak/docker-http-https-echo]
Well it looks like a mapping of some sort. Looking better now?
Looks very good! You can add json
in the formatting string to get JSON:
$ docker inspect mendhak/http-https-echo:labels --format '{{json .Config.Labels }}' | jq
{
"org.opencontainers.image.description": "Docker image that echoes request data as JSON; listens on HTTP/S, with various extra features, useful for debugging.",
"org.opencontainers.image.documentation": "https://github.com/mendhak/docker-http-https-echo/blob/master/README.md",
"org.opencontainers.image.licenses": "MIT",
"org.opencontainers.image.source": "https://github.com/mendhak/docker-http-https-echo",
"org.opencontainers.image.title": "http-https-echo",
"org.opencontainers.image.url": "https://github.com/mendhak/docker-http-https-echo"
}
Thanks again for that. :27 is now in Docker Hub.
Request: Make distributed docker image contain
org.opencontainers.image.source
label for easy reference back to this repository when mendhak/http-https-echo image gets updates.We are building a custom image off of
mendhak/http-https-echo
, and we are using automatic tools to update the version of that base image, and those tools can create better pull request with more metadata if this is found is standardised labels.It is some other pre-defined OCI keys, but
org.opencontainers.image.source
should be the correct one.