Skip to content
This repository has been archived by the owner on Aug 28, 2019. It is now read-only.

Images built with img can't be uploaded to artifactory #15

Closed
v-yarotsky opened this issue Apr 8, 2019 · 3 comments
Closed

Images built with img can't be uploaded to artifactory #15

v-yarotsky opened this issue Apr 8, 2019 · 3 comments

Comments

@v-yarotsky
Copy link

Using this task together with registry-image-resource, I'm getting weird errors from artifactory docker registry when trying to upload an image:

INFO[0000] pushing sha256:9231c75dfa48563b354f4d40126d077a3ef5029718c352a53120a16e53704560 to foo-docker-local.jfrog.io/foo/my-image:latest
2019/04/08 19:38:55 Unsolicited response received on idle HTTP channel starting with "0\r\n\r\n"; err=<nil>
2019/04/08 19:38:55 existing blob: sha256:7a817918d4d52ca5e7c3c57d904971a321843ba919e35bab135452b2f4f23b66
...
2019/04/08 19:38:56 pushed blob: sha256:505298b4cecec8ac9200ea514da5f7bdcbb8e5f0950cdc461a51ee697338b8d1
...
ERRO[0003] failed to upload image: MANIFEST_INVALID: "manifest invalid" 

Initially I suspected there was a problem between registry-image-resource and artifactory, but then I narrowed it down to img by building the image with docker daemon and pushing it using registry-image-resource.
Building the image using this task and then pushing it using the old docker-image resource (via load_file) works, too.
GoogleContainerTools/jib#534 may or may not be related.
The issue is still reproducible with img 0.5.6.

I'm posting this here to make it easier for other concourse users to find.

@SimonXming
Copy link

SimonXming commented Jun 3, 2019

I have the same problem, using registry-image-resource will fail but docker-image-resource works fine.

INFO[0000] pushing sha256:410e351a25f7ffe96510bdb647979877c7ab091286806aa6b471555de8d014ef to devtools-docker-local.artifactory.eng.vmware.com/mingx/ci/test/destination-image:latest 
2019/06/03 10:24:31 existing blob: sha256:51fdbfb606653f7e1a277b882c739498422699999d6f9f0a70a222f70ef070b6
2019/06/03 10:24:31 existing blob: sha256:40ad735a124805d6c8f930bb2827bc461483cb15e631e1c6e687979f63734982
2019/06/03 10:24:31 existing blob: sha256:02ebff4b5ba8f306144e20cae965f1035057268a0a0536dc08205c802d7bf209
2019/06/03 10:24:31 existing blob: sha256:e7c96db7181be991f19a9fb6975cdbbd73c65f4a2681348e63a141a2192a5f10
2019/06/03 10:24:32 pushed blob: sha256:23b72947dec7ca68a4f2591a0623b343a8216e058403883efb3c82f15cbbcd27
2019/06/03 10:24:32 pushed blob: sha256:b1437a872c4b8b0947fd76c3ce9c75092056d48b3821069646a4cd788a41e982
2019/06/03 10:24:32 pushed blob: sha256:6f72fbf3e1e17bbee387b0a7f29489efbac54e7641f8e33ccd4fdd95d11c4f03
2019/06/03 10:24:32 pushed blob: sha256:db44026bc075c59ce1aac3dfc83e3486a5222f083108f014a9ea5bce597df829
ERRO[0001] failed to upload image: MANIFEST_INVALID: "manifest invalid" 

Update:
Using docker build and docker save in a custom task and then pushing it using registry-image-resource works.

@jmccann
Copy link

jmccann commented Jul 12, 2019

So I'm not sure what can cause this. I'll just add that I originally hadn't ran into this issue before.

Then today I did on a new repo in artifactory I was trying to push to. First push worked, then subsequent ones gave the above error.

For me it turned out to be a perms issue ... didn't have delete on the repo for the account I was using. I finally realized that when switching to docker-image-resource and getting a manifest invalid with that also.

I think @SimonXming example proves it doesn't have to be a perms issue ... but it seems perm issues could also cause this.

@vito
Copy link
Contributor

vito commented Aug 27, 2019

Would you mind trying this again with the oci-build task and opening an issue there if it's still an issue? This task is being phased out in favor of it. Thanks!

@vito vito closed this as completed Aug 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants