Skip to content

Commit

Permalink
Merge pull request #19 from infosiftr/org.opencontainers.image.base
Browse files Browse the repository at this point in the history
Set `org.opencontainers.image.base.name` (and `org.opencontainers.image.base.digest`) appropriately
  • Loading branch information
yosifkit authored Jan 29, 2024
2 parents a80a2c8 + bfaf427 commit c3c2985
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 7 deletions.
22 changes: 22 additions & 0 deletions .test/builds.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"froms": [
"alpine:3.18"
],
"lastStageFrom": "alpine:3.18",
"platformString": "linux/amd64",
"platform": {
"architecture": "amd64",
Expand Down Expand Up @@ -190,6 +191,7 @@
"froms": [
"alpine:3.18"
],
"lastStageFrom": "alpine:3.18",
"platformString": "linux/arm/v6",
"platform": {
"architecture": "arm",
Expand Down Expand Up @@ -302,6 +304,7 @@
"froms": [
"alpine:3.18"
],
"lastStageFrom": "alpine:3.18",
"platformString": "linux/arm/v7",
"platform": {
"architecture": "arm",
Expand Down Expand Up @@ -414,6 +417,7 @@
"froms": [
"alpine:3.18"
],
"lastStageFrom": "alpine:3.18",
"platformString": "linux/arm64/v8",
"platform": {
"architecture": "arm64",
Expand Down Expand Up @@ -540,6 +544,7 @@
"froms": [
"docker:24-cli"
],
"lastStageFrom": "docker:24-cli",
"platformString": "linux/amd64",
"platform": {
"architecture": "amd64",
Expand Down Expand Up @@ -639,6 +644,7 @@
"froms": [
"docker:24-cli"
],
"lastStageFrom": "docker:24-cli",
"platformString": "linux/arm/v6",
"platform": {
"architecture": "arm",
Expand Down Expand Up @@ -767,6 +773,7 @@
"froms": [
"docker:24-cli"
],
"lastStageFrom": "docker:24-cli",
"platformString": "linux/arm/v7",
"platform": {
"architecture": "arm",
Expand Down Expand Up @@ -895,6 +902,7 @@
"froms": [
"docker:24-cli"
],
"lastStageFrom": "docker:24-cli",
"platformString": "linux/arm64/v8",
"platform": {
"architecture": "arm64",
Expand Down Expand Up @@ -1002,6 +1010,7 @@
"froms": [
"mcr.microsoft.com/windows/servercore:ltsc2022"
],
"lastStageFrom": "mcr.microsoft.com/windows/servercore:ltsc2022",
"platformString": "windows/amd64",
"platform": {
"architecture": "amd64",
Expand Down Expand Up @@ -1108,6 +1117,7 @@
"froms": [
"mcr.microsoft.com/windows/servercore:1809"
],
"lastStageFrom": "mcr.microsoft.com/windows/servercore:1809",
"platformString": "windows/amd64",
"platform": {
"architecture": "amd64",
Expand Down Expand Up @@ -1236,6 +1246,7 @@
"alpine:3.16",
"golang:1.19-alpine3.16"
],
"lastStageFrom": "alpine:3.16",
"platformString": "linux/amd64",
"platform": {
"architecture": "amd64",
Expand Down Expand Up @@ -1357,6 +1368,7 @@
"alpine:3.16",
"golang:1.19-alpine3.16"
],
"lastStageFrom": "alpine:3.16",
"platformString": "linux/arm/v6",
"platform": {
"architecture": "arm",
Expand Down Expand Up @@ -1493,6 +1505,7 @@
"alpine:3.16",
"golang:1.19-alpine3.16"
],
"lastStageFrom": "alpine:3.16",
"platformString": "linux/arm64/v8",
"platform": {
"architecture": "arm64",
Expand Down Expand Up @@ -1626,6 +1639,7 @@
"alpine:3.16",
"golang:1.19-alpine3.16"
],
"lastStageFrom": "alpine:3.16",
"platformString": "linux/386",
"platform": {
"architecture": "386",
Expand Down Expand Up @@ -1758,6 +1772,7 @@
"alpine:3.16",
"golang:1.19-alpine3.16"
],
"lastStageFrom": "alpine:3.16",
"platformString": "linux/ppc64le",
"platform": {
"architecture": "ppc64le",
Expand Down Expand Up @@ -1890,6 +1905,7 @@
"alpine:3.16",
"golang:1.19-alpine3.16"
],
"lastStageFrom": "alpine:3.16",
"platformString": "linux/s390x",
"platform": {
"architecture": "s390x",
Expand Down Expand Up @@ -2022,6 +2038,7 @@
"alpine:3.16",
"golang:1.19-alpine3.16"
],
"lastStageFrom": "alpine:3.16",
"platformString": "linux/amd64",
"platform": {
"architecture": "amd64",
Expand Down Expand Up @@ -2143,6 +2160,7 @@
"alpine:3.16",
"golang:1.19-alpine3.16"
],
"lastStageFrom": "alpine:3.16",
"platformString": "linux/arm/v6",
"platform": {
"architecture": "arm",
Expand Down Expand Up @@ -2279,6 +2297,7 @@
"alpine:3.16",
"golang:1.19-alpine3.16"
],
"lastStageFrom": "alpine:3.16",
"platformString": "linux/arm64/v8",
"platform": {
"architecture": "arm64",
Expand Down Expand Up @@ -2412,6 +2431,7 @@
"alpine:3.16",
"golang:1.19-alpine3.16"
],
"lastStageFrom": "alpine:3.16",
"platformString": "linux/386",
"platform": {
"architecture": "386",
Expand Down Expand Up @@ -2544,6 +2564,7 @@
"alpine:3.16",
"golang:1.19-alpine3.16"
],
"lastStageFrom": "alpine:3.16",
"platformString": "linux/ppc64le",
"platform": {
"architecture": "ppc64le",
Expand Down Expand Up @@ -2676,6 +2697,7 @@
"alpine:3.16",
"golang:1.19-alpine3.16"
],
"lastStageFrom": "alpine:3.16",
"platformString": "linux/s390x",
"platform": {
"architecture": "s390x",
Expand Down
4 changes: 4 additions & 0 deletions .test/example-commands.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ SOURCE_DATE_EPOCH=1700741054 \
--annotation 'org.opencontainers.image.created=2023-11-23T12:04:14Z' \
--annotation 'org.opencontainers.image.version=24.0.7-cli' \
--annotation 'org.opencontainers.image.url=https://hub.docker.com/_/docker' \
--annotation 'org.opencontainers.image.base.name=alpine:3.18' \
--annotation 'org.opencontainers.image.base.digest=sha256:d695c3de6fcd8cfe3a6222b0358425d40adfd129a8a47c3416faff1a8aece389' \
--annotation 'manifest-descriptor:org.opencontainers.image.source=https://github.com/docker-library/docker.git#6d541d27b5dd12639e5a33a675ebca04d3837d74:24/cli' \
--annotation 'manifest-descriptor:org.opencontainers.image.revision=6d541d27b5dd12639e5a33a675ebca04d3837d74' \
--annotation 'manifest-descriptor:org.opencontainers.image.created=1970-01-01T00:00:00Z' \
--annotation 'manifest-descriptor:org.opencontainers.image.version=24.0.7-cli' \
--annotation 'manifest-descriptor:org.opencontainers.image.url=https://hub.docker.com/_/docker' \
--annotation 'manifest-descriptor:org.opencontainers.image.base.name=alpine:3.18' \
--annotation 'manifest-descriptor:org.opencontainers.image.base.digest=sha256:d695c3de6fcd8cfe3a6222b0358425d40adfd129a8a47c3416faff1a8aece389' \
--tag 'docker:24.0.7-cli' \
--tag 'docker:24.0-cli' \
--tag 'docker:24-cli' \
Expand Down
22 changes: 22 additions & 0 deletions .test/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"froms": [
"alpine:3.18"
],
"lastStageFrom": "alpine:3.18",
"platformString": "linux/amd64",
"platform": {
"architecture": "amd64",
Expand All @@ -55,6 +56,7 @@
"froms": [
"alpine:3.18"
],
"lastStageFrom": "alpine:3.18",
"platformString": "linux/arm/v6",
"platform": {
"architecture": "arm",
Expand All @@ -80,6 +82,7 @@
"froms": [
"alpine:3.18"
],
"lastStageFrom": "alpine:3.18",
"platformString": "linux/arm/v7",
"platform": {
"architecture": "arm",
Expand All @@ -105,6 +108,7 @@
"froms": [
"alpine:3.18"
],
"lastStageFrom": "alpine:3.18",
"platformString": "linux/arm64/v8",
"platform": {
"architecture": "arm64",
Expand Down Expand Up @@ -162,6 +166,7 @@
"froms": [
"docker:24-cli"
],
"lastStageFrom": "docker:24-cli",
"platformString": "linux/amd64",
"platform": {
"architecture": "amd64",
Expand Down Expand Up @@ -191,6 +196,7 @@
"froms": [
"docker:24-cli"
],
"lastStageFrom": "docker:24-cli",
"platformString": "linux/arm/v6",
"platform": {
"architecture": "arm",
Expand Down Expand Up @@ -221,6 +227,7 @@
"froms": [
"docker:24-cli"
],
"lastStageFrom": "docker:24-cli",
"platformString": "linux/arm/v7",
"platform": {
"architecture": "arm",
Expand Down Expand Up @@ -251,6 +258,7 @@
"froms": [
"docker:24-cli"
],
"lastStageFrom": "docker:24-cli",
"platformString": "linux/arm64/v8",
"platform": {
"architecture": "arm64",
Expand Down Expand Up @@ -304,6 +312,7 @@
"froms": [
"mcr.microsoft.com/windows/servercore:ltsc2022"
],
"lastStageFrom": "mcr.microsoft.com/windows/servercore:ltsc2022",
"platformString": "windows/amd64",
"platform": {
"architecture": "amd64",
Expand Down Expand Up @@ -356,6 +365,7 @@
"froms": [
"mcr.microsoft.com/windows/servercore:1809"
],
"lastStageFrom": "mcr.microsoft.com/windows/servercore:1809",
"platformString": "windows/amd64",
"platform": {
"architecture": "amd64",
Expand Down Expand Up @@ -398,6 +408,7 @@
"alpine:3.16",
"golang:1.19-alpine3.16"
],
"lastStageFrom": "alpine:3.16",
"platformString": "linux/amd64",
"platform": {
"architecture": "amd64",
Expand Down Expand Up @@ -425,6 +436,7 @@
"alpine:3.16",
"golang:1.19-alpine3.16"
],
"lastStageFrom": "alpine:3.16",
"platformString": "linux/arm/v6",
"platform": {
"architecture": "arm",
Expand Down Expand Up @@ -453,6 +465,7 @@
"alpine:3.16",
"golang:1.19-alpine3.16"
],
"lastStageFrom": "alpine:3.16",
"platformString": "linux/arm64/v8",
"platform": {
"architecture": "arm64",
Expand Down Expand Up @@ -481,6 +494,7 @@
"alpine:3.16",
"golang:1.19-alpine3.16"
],
"lastStageFrom": "alpine:3.16",
"platformString": "linux/386",
"platform": {
"architecture": "386",
Expand Down Expand Up @@ -508,6 +522,7 @@
"alpine:3.16",
"golang:1.19-alpine3.16"
],
"lastStageFrom": "alpine:3.16",
"platformString": "linux/ppc64le",
"platform": {
"architecture": "ppc64le",
Expand Down Expand Up @@ -535,6 +550,7 @@
"alpine:3.16",
"golang:1.19-alpine3.16"
],
"lastStageFrom": "alpine:3.16",
"platformString": "linux/s390x",
"platform": {
"architecture": "s390x",
Expand Down Expand Up @@ -581,6 +597,7 @@
"alpine:3.16",
"golang:1.19-alpine3.16"
],
"lastStageFrom": "alpine:3.16",
"platformString": "linux/amd64",
"platform": {
"architecture": "amd64",
Expand Down Expand Up @@ -608,6 +625,7 @@
"alpine:3.16",
"golang:1.19-alpine3.16"
],
"lastStageFrom": "alpine:3.16",
"platformString": "linux/arm/v6",
"platform": {
"architecture": "arm",
Expand Down Expand Up @@ -636,6 +654,7 @@
"alpine:3.16",
"golang:1.19-alpine3.16"
],
"lastStageFrom": "alpine:3.16",
"platformString": "linux/arm64/v8",
"platform": {
"architecture": "arm64",
Expand Down Expand Up @@ -664,6 +683,7 @@
"alpine:3.16",
"golang:1.19-alpine3.16"
],
"lastStageFrom": "alpine:3.16",
"platformString": "linux/386",
"platform": {
"architecture": "386",
Expand Down Expand Up @@ -691,6 +711,7 @@
"alpine:3.16",
"golang:1.19-alpine3.16"
],
"lastStageFrom": "alpine:3.16",
"platformString": "linux/ppc64le",
"platform": {
"architecture": "ppc64le",
Expand Down Expand Up @@ -718,6 +739,7 @@
"alpine:3.16",
"golang:1.19-alpine3.16"
],
"lastStageFrom": "alpine:3.16",
"platformString": "linux/s390x",
"platform": {
"architecture": "s390x",
Expand Down
Loading

0 comments on commit c3c2985

Please sign in to comment.