docker-archive / docker-registry

This is **DEPRECATED**! Please go to https://github.com/docker/distribution
Apache License 2.0
2.88k stars 879 forks source link

image tags with {} in them break #619

Open silarsis opened 9 years ago

silarsis commented 9 years ago

Running off master as at 6th October on an S3 store, we had some images with the literal string "${bamboo.buildNumber}" in the tag name (accidentally). Those images stopped being accessible - you could push new or existing tags, but couldn't list tags or pull the images.

I suspect some attempted string interpolation somewhere, but haven't been able to get time to track it down. I'm also not entirely sure that the issue was introduced by running master, but we had to do that to resolve a separate issue.

dmp42 commented 9 years ago

@silarsis can you s3cmd ls s3://BUCKET/repositories/USER/IMAGENAME/

Thanks!

silarsis commented 9 years ago

Sorry, I deleted the offending files to get things working again (via the AWS web console, which showed the files fine). I will try replicate the conditions again this morning.

On Fri, Oct 10, 2014 at 8:23 AM, Olivier Gambier notifications@github.com wrote:

@silarsis https://github.com/silarsis can you s3cmd ls s3://BUCKET/repositories/USER/IMAGENAME/

Thanks!

— Reply to this email directly or view it on GitHub https://github.com/docker/docker-registry/issues/619#issuecomment-58579994 .

silarsis commented 9 years ago

s3cmd seems to want access credentials that I don't have - the registry is using an instance policy and the s3cmd seems to want keys etc. So I'm not sure I can test in the way you've requested. I can give you the following demonstration of the problem (registry name not real):

puck:~ silarsis$ docker tag dev my.registry.com.au/kevinl/dev:$\{test\}
puck:~ silarsis$ docker images | grep dev
dev                                                                            latest              108d6a247018        8 minutes ago       882.1 MB
my.registry.com.au/kevinl/dev                          latest              108d6a247018        8 minutes ago       882.1 MB
my.registry.com.au/kevinl/dev                          ${test}             108d6a247018        8 minutes ago       882.1 MB
puck:~ silarsis$ docker push my.registry.com.au/kevinl/dev:$\{test\}
The push refers to a repository [my.registry.com.au/kevinl/dev] (len: 1)
Sending image list
Pushing repository my.registry.com.au/kevinl/dev (1 tags)
...
108d6a247018: Image successfully pushed
Pushing tag for rev [108d6a247018] on {https://my.registry.com.au/v1/repositories/kevinl/dev/tags/${test}}
puck:~ silarsis$ docker pull my.registry.com.au/kevinl/dev
Pulling repository my.registry.com.au/kevinl/dev
2014/10/13 09:23:36 Repository not found
dmp42 commented 9 years ago

Thanks a lot. Will look into it for the next version.