The reference does not exist means that the image you are trying to export\save\use is not there.
In your case it is because you are using the "wrong" name.
When you build the image, you have 3 parts: the container registry, the name itself, and the tag
When you try and save it tho you use only name and tag. You have to specify the container registry name as well. The Docker task do not propagate it to the command
Thank you very much! it is working :)
Just wondering why do I have to to explicitly specify again the container registry if I'm specifying it it the task itself in the third line (the connectionForLabBuild service connection already define it)...
The reason for this is that save is not a command that is implemented in the task out of the box.
It works because what the task does is just appending the command part to the docker command, and then append the arguments. But the other fields, like container registry, are ignored because the task code "doesn't know what to do" with a command that is not being implemented.
Hope this clarifies :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The
reference does not exist
means that the image you are trying to export\save\use is not there.In your case it is because you are using the "wrong" name.
When you build the image, you have 3 parts: the container registry, the name itself, and the tag
When you try and save it tho you use only name and tag. You have to specify the container registry name as well. The Docker task do not propagate it to the command
It should be something like:
And
$(ContainerRegistryName)
is a variable that you have to save or create somewhere before thatThank you very much! it is working :)
Just wondering why do I have to to explicitly specify again the container registry if I'm specifying it it the task itself in the third line (the connectionForLabBuild service connection already define it)...
Thank a lot! I really appreciate !
task: Docker@2
inputs:
containerRegistry: 'connectionForLabBuild'
repository: 'bapp.roadMapper'
command: 'save'
arguments: --output $(build.artifactstagingdirectory)/bapp.roadMapper.tar bapp.roadMapper:$(Version)
The reason for this is that
save
is not a command that is implemented in the task out of the box.It works because what the task does is just appending the
command
part to thedocker
command, and then append the arguments. But the other fields, like container registry, are ignored because the task code "doesn't know what to do" with a command that is not being implemented.Hope this clarifies :)