Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: from-args should support docker manifest like syntax #121

Open
ajaykmis opened this issue May 18, 2021 · 1 comment
Open

Comments

@ajaykmis
Copy link

First of all, Thanks for the tool!!

I am trying to use this to create/push a manifest from inside the docker container (can't use docker). I want to avoid writing a temporary file to pass in from-spec.

so, for the from-args, would it be possible to add multiple args (similar to docker manifest) to add images to the manifest. Currently the --template only takes the name of the image, for example, gcr.io/imagename-ARCH, but it wouldn't work if the image names don't conform to a common format.

for example, I build arm64 and amd64 builds separately, and so the tag's are actually different:

arm64: gcr.io/image-name-arm64:14
amd64: gcr.io/image-name-amd64:15 

so, in this case, you can't use the --template args and have to use from-spec to specify the full name for each arch type.
docker manifest command:

docker manifest create gcr.io/image-name:1-multi --amend gcr.io/image-name:1-arm64 --amend gcr.io/image-name/:1-amd64

would be nice to have something like:

./manifest-tool push --from-args --image-name gcr.io/image-name:1-multi  --amend gcr.io/image-name:1-arm64 --amend gcr.io/image-name/:1-amd64

Please let me know if there's another way to do this from the command line.

@YAMLcase
Copy link

This would be really useful to rebuild official docker images with only the os/arch we need, i.e. those that we're actually using and passed vulnerability scanning. What we're currently doing is manifest inspect to get select digests, then build a spec file with those digests.:

image: my-registry.example.com/library/busybox:1
manifests:
  -
    image: my-registry.example.com/tmp-repo/busybox@sha256:ccff0c7e8498c0bd8d477777777e1a43b86fb091
    platform:
      architecture: amd64
      os: linux
  -
    image: my-registry.example.com/tmp-repo/busybox@sha256:dca71257cd2e728408888888802146f583486b
    platform:
      architecture: '386'
      os: linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants