Containerfile LABEL is annotation?
Description
Should Containerfile/Dockerfile LABEL end up as Labels (like it is) or annotations map (from spec)?
There's no obvious spec file but in the lack of ANNOTATIONS as a keyword it seems to map.
I've seen I can achieve this with buildah manifest annotate (and buildah config --annotation), I'm just wondering if the file based implementation is still correct with spec development
Steps to reproduce the issue: 1. Dockerfile:
FROM ubuntu:jammy
LABEL org.opencontainers.image.authors="MariaDB Community"
- buildah bud --tag m10x .
- podman inspect m10x
Describe the results you received:
...
"OCIv1": {
"created": "2022-10-19T00:23:52.586469914Z",
"architecture": "amd64",
"os": "linux",
"config": {
...
"Labels": {
"io.buildah.version": "1.27.0",
"org.opencontainers.image.authors": "MariaDB Community",
Describe the results you expected:
...
"OCIv1": {
"created": "2022-10-19T00:23:52.586469914Z",
"architecture": "amd64",
"os": "linux",
"config": {
...
"Annotations": {
"io.buildah.version": "1.27.0",
"org.opencontainers.image.authors": "MariaDB Community",
Output of rpm -q buildah or apt list buildah:
$ rpm -q buildah
buildah-1.27.0-1.fc36.x86_64
Output of buildah version:
$ buildah version
Version: 1.27.0
Go Version: go1.18.4
Image Spec: 1.0.2-dev
Runtime Spec: 1.0.2-dev
CNI Spec: 1.0.0
libcni Version: v1.1.2
image Version: 5.22.0
Git Commit:
Built: Tue Aug 9 12:26:49 2022
OS/Arch: linux/amd64
BuildPlatform: linux/amd64
Output of podman version if reporting a podman build issue:
(paste your output here)
Output of cat /etc/*release:
Fedora release 36 (Thirty Six)
NAME="Fedora Linux"
VERSION="36 (Workstation Edition)"
ID=fedora
VERSION_ID=36
VERSION_CODENAME=""
PLATFORM_ID="platform:f36"
PRETTY_NAME="Fedora Linux 36 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:36"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f36/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=36
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=36
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="Workstation Edition"
VARIANT_ID=workstation
Fedora release 36 (Thirty Six)
Fedora release 36 (Thirty Six)
cpe:/o:fedoraproject:fedora:36
Output of uname -a:
Linux localhost.localdomain 6.0.0-54.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Oct 3 14:23:56 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Hi @grooverdan ,
Thanks for creating the issue. I have no issues by making ANNOTATION a Containerfile instruction but it is not supported by dockerfile officially so this will be only supported on buildah and processing same Containerfile with docker and other build tools will break. Unless we decide to call is #ANNOTATION.
@nalind @rhatdan @containers/buildah-maintainers WDYT ?
If its an option, I think I'd prefer a --label-as-annotation flag to change the output as I'm maintaining a docker library official image as well as building locally. I'm just following it for standards sake, so addition ANNOTATION instructions aren't as maintainable.
Overall this is just a question more than a strong need to do it a particular way.
@grooverdan I think --label-as-annotation is a good idea :) and also easy to implement/maintain.
A friendly reminder that this issue had no activity for 30 days.
@flouthoc Any progress on this?
A friendly reminder that this issue had no activity for 30 days.
@flouthoc Any progress on this?
A friendly reminder that this issue had no activity for 30 days.
@flouthoc Friendly ping.
A friendly reminder that this issue had no activity for 30 days.
A friendly reminder that this issue had no activity for 30 days.
Removing stale.
A friendly reminder that this issue had no activity for 30 days.
I would go along with --ltoa
A friendly reminder that this issue had no activity for 30 days.