Open nischit7 opened 4 years ago
I am having the same issue here with a similar configuration
- put: docker.myregistry
params:
load_repository: "myregistry/myimage"
load_file: OUTPUTS/image.tar # pulled in from a previous step
tag_file: OUTPUTS/my-dynamic.tag.txt # also pulled in from a previous step
Concourse always tries to push "myregistry/myimage:latest" even though the tag is specified in the tag_file.
All other experiments failed aswell (providing tag
etc.)
UPDATE: It seems the resource is always appending :latest
to the load_repository
variable. Why is this even needed (though readme states it as optional, you get an error when it is missing)? Registry, repository, image name should be provided by the file being loaded. This should be an optional value if you want to overwrite the data provided by the tarball IMHO. I'd flag this as a bug.
When the image pulled in get
step, it is based on the image digest here
https://github.com/concourse/docker-image-resource/blob/a8be31e9f597500657db1b773e178ad8a23eb602/assets/in#L56
And when it got saved with the name that with digest only, it loses repo and tag info https://github.com/concourse/docker-image-resource/blob/a8be31e9f597500657db1b773e178ad8a23eb602/assets/in#L72
So later when you load this tar in put step, I'd assume the docker image ls
show sth like this:
REPOSITORY TAG IMAGE ID CREATED SIZE
<none> <none> 12344asdf 8 weeks ago 64.5 MB
So there is no way it can know what the repo ad tag are, and thus we have to make load_repository
required when using load_file
. Also we have to default to latest
tag if load_tag
is not provided.
I am trying to use this Concourse CI resource to pulling specific "tagged" docker image. I tried working out a solution using both https://github.com/concourse/registry-image-resource and https://github.com/concourse/docker-image-resource. From the documentation, I dont see a way to achieve it.
In the below approach, Its declared as a resource and the tag remains same for rest of the execution.
What I would like to achieve is, when declaring multiple steps, I would like to do something as below.
Right now... i am unable to provide something like above. It always ends up pulling the latest image. I tried the params such as "load", "load_file", "load_tag". But no luck Any directions?