Closed raffaelespazzoli closed 7 years ago
Just to narrow this down a bit since I'm seeing your using these new *creds
flags. Are you able to make this work by not using the flags and just oc login?
@runcom , Antonio, I don't understand the question. did you mean docker login? Because I didn't think that an oc login had any bearing on skopeo behavior...
Anyway in order to do an oc whoami
, which is part of the command, I had to previously login to oc.
Plus why would the login phase have anything to do with the manigest format, which seems to be the reason why the command is failing?
Plus why would the login phase have anything to do with the manigest format, which seems to be the reason why the command is failing?
never mind, I replied too fast w/o looking at the logs - @mtrmac PTAL
DEBU[0000] Manifest MIME type application/vnd.docker.distribution.manifest.v2+json is declared supported by the destination
Yeah, this is #86. For now, using atomic:
instead of docker://
in the destination specification should work around this. Does that work?
I changed my command line to
skopeo --debug --tls-verify=false copy --dest-creds `oc whoami`:`oc whoami -t` --src-creds `oc whoami`:`oc whoami -t` atomic:hub.openshift.rhel-cdk.10.1.2.2.xip.io:443/jenkins2/docker:latest atomic:hub.openshift.rhel-cdk.10.1.2.2.xip.io:443/jenkins2/docker:ciao2
as instructed. I now get this error
DEBU[0000] cmdConfig: &openshift.deferredLoadingClientConfig{loadingRules:(*openshift.clientConfigLoadingRules)(0xc82027df00), clientConfig:openshift.clientConfig(nil)}
DEBU[0000] restConfig: &openshift.restConfig{Host:"https://10.1.2.2:8443", Username:"", Password:"", BearerToken:"ePPzhRzfxj_pSdv3C19tIuWFafcYuVVkR3NwDPA5elg", restTLSClientConfig:openshift.restTLSClientConfig{CertFile:"", KeyFile:"", CAFile:"", CertData:[]uint8(nil), KeyData:[]uint8(nil), CAData:[]uint8(nil)}, Insecure:true}
DEBU[0000] URL: url.URL{Scheme:"https", Opaque:"", User:(*url.Userinfo)(nil), Host:"10.1.2.2:8443", Path:"", RawPath:"", RawQuery:"", Fragment:""}
DEBU[0000] Using registries.d directory /etc/containers/registries.d for sigstore configuration
DEBU[0000] Using "default-docker" configuration
DEBU[0000] Using file:///var/lib/atomic/sigstore
DEBU[0000] cmdConfig: &openshift.deferredLoadingClientConfig{loadingRules:(*openshift.clientConfigLoadingRules)(0xc820352320), clientConfig:openshift.clientConfig(nil)}
DEBU[0000] restConfig: &openshift.restConfig{Host:"https://10.1.2.2:8443", Username:"", Password:"", BearerToken:"ePPzhRzfxj_pSdv3C19tIuWFafcYuVVkR3NwDPA5elg", restTLSClientConfig:openshift.restTLSClientConfig{CertFile:"", KeyFile:"", CAFile:"", CertData:[]uint8(nil), KeyData:[]uint8(nil), CAData:[]uint8(nil)}, Insecure:true}
DEBU[0000] URL: url.URL{Scheme:"https", Opaque:"", User:(*url.Userinfo)(nil), Host:"10.1.2.2:8443", Path:"", RawPath:"", RawQuery:"", Fragment:""}
DEBU[0000] IsRunningImageAllowed for image atomic:hub.openshift.rhel-cdk.10.1.2.2.xip.io:443/jenkins2/docker:latest
DEBU[0000] Using default policy section
DEBU[0000] Requirement 0: allowed
DEBU[0000] Overall: allowed
DEBU[0000] GET {https <nil> 10.1.2.2:8443 /oapi/v1/namespaces/jenkins2/imagestreams/docker }
DEBU[0000] Got body: {"kind":"ImageStream","apiVersion":"v1","metadata":{"name":"docker","namespace":"jenkins2","selfLink":"/oapi/v1/namespaces/jenkins2/imagestreams/docker","uid":"87f04d18-b1e7-11e6-8796-5254007f3655","resourceVersion":"130672","generation":10,"creationTimestamp":"2016-11-24T01:44:25Z","labels":{"app":"docker"},"annotations":{"openshift.io/generated-by":"OpenShiftNewApp","openshift.io/image.dockerRepositoryCheck":"2016-11-26T05:20:11Z"}},"spec":{"tags":[{"name":"latest","annotations":{"openshift.io/imported-from":"docker"},"from":{"kind":"DockerImage","name":"docker"},"generation":10,"importPolicy":{}}]},"status":{"dockerImageRepository":"172.30.144.245:5000/jenkins2/docker","tags":[{"tag":"latest","items":[{"created":"2016-11-26T05:20:11Z","dockerImageReference":"docker@sha256:83795a384fd7321e1a58d06c2fa2b86a0f0ce9e4a75c91aa382317b3c453671d","image":"sha256:83795a384fd7321e1a58d06c2fa2b86a0f0ce9e4a75c91aa382317b3c453671d","generation":10},{"created":"2016-11-26T04:39:00Z","dockerImageReference":"docker@sha256:9cfeaf7b1d09b5a388b8e98fcd132fdf272edd13751b2a1057a781daac07cab7","image":"sha256:9cfeaf7b1d09b5a388b8e98fcd132fdf272edd13751b2a1057a781daac07cab7","generation":8},{"created":"2016-11-26T04:37:35Z","dockerImageReference":"docker@sha256:83795a384fd7321e1a58d06c2fa2b86a0f0ce9e4a75c91aa382317b3c453671d","image":"sha256:83795a384fd7321e1a58d06c2fa2b86a0f0ce9e4a75c91aa382317b3c453671d","generation":6},{"created":"2016-11-26T04:36:01Z","dockerImageReference":"docker@sha256:9cfeaf7b1d09b5a388b8e98fcd132fdf272edd13751b2a1057a781daac07cab7","image":"sha256:9cfeaf7b1d09b5a388b8e98fcd132fdf272edd13751b2a1057a781daac07cab7","generation":4},{"created":"2016-11-24T01:44:26Z","dockerImageReference":"docker@sha256:83795a384fd7321e1a58d06c2fa2b86a0f0ce9e4a75c91aa382317b3c453671d","image":"sha256:83795a384fd7321e1a58d06c2fa2b86a0f0ce9e4a75c91aa382317b3c453671d","generation":2}]},{"tag":"ciao","items":[{"created":"2016-11-25T16:21:50Z","dockerImageReference":"172.30.144.245:5000/jenkins2/docker@sha256:4cef65809efb24dc9616fbe7dc880e6e3687689b91dbafeb93fcf36654b0da68","image":"sha256:4cef65809efb24dc9616fbe7dc880e6e3687689b91dbafeb93fcf36654b0da68","generation":10}]}]}}
DEBU[0000] Got content-type: application/json
DEBU[0000] tag event &openshift.tagEvent{DockerImageReference:"docker@sha256:83795a384fd7321e1a58d06c2fa2b86a0f0ce9e4a75c91aa382317b3c453671d", Image:"sha256:83795a384fd7321e1a58d06c2fa2b86a0f0ce9e4a75c91aa382317b3c453671d"}
FATA[0000] Error initializing image from source atomic:hub.openshift.rhel-cdk.10.1.2.2.xip.io:443/jenkins2/docker:latest: Invalid format of docker reference docker@sha256:83795a384fd7321e1a58d06c2fa2b86a0f0ce9e4a75c91aa382317b3c453671d: missing '/'
Using the following command, I was able to copy between two OpenShift registries
./skopeo --policy default-policy.json --tls-verify=false copy --src-creds=openshift:WepBAoU6sY4_reJStK29GewgzYx6YoE3-nSdPWDhQus --dest-creds=openshift:WepBAoU6sY4_reJStK29GewgzYx6YoE3-nSdPWDhQus docker://hub.openshift.rhel-cdk.10.1.2.2.xip.io/test-promote/httpd-app:latest docker://hub.openshift.rhel-cdk.10.1.2.2.xip.io/skopeo-test/httpd-app:latest
CDK with OCP 3.3 (pre release) and built and running skopeo on RHEL 7.2
skopeo --debug --tls-verify=false copy --dest-creds `oc whoami`:`oc whoami -t` --src-creds `oc whoami`:`oc whoami -t` atomic:hub.openshift.rhel-cdk.10.1.2.2.xip.io:443/jenkins2/docker:latest atomic:hub.openshift.rhel-cdk.10.1.2.2.xip.io:443/jenkins2/docker:ciao2
@aweiteka in this case, the source image (hub.openshift.rhel-cdk.10.1.2.2.xip.io:443/jenkins2/docker:latest
) has a tagEvent
value:
DEBU[0000] tag event &openshift.tagEvent{DockerImageReference:"docker@sha256:83795a384fd7321e1a58d06c2fa2b86a0f0ce9e4a75c91aa382317b3c453671d", Image:"sha256:83795a384fd7321e1a58d06c2fa2b86a0f0ce9e4a75c91aa382317b3c453671d"}
Any idea why the DockerImageReference
is a bare docker
without a hostname (not even the incorrect internal IP address a usual)?
@sabre1041 as another workaround, try using atomic:
only for the destination, not the source.
Using the following command, I was able to copy between two OpenShift registries
Is the difference only in the image names? Do they differ in schema versions perhaps?
Hmm, I don't know, although I'm not sure I completely follow the entire issue.
@mtrmac It was working successful for my test. I will attempt to build a bunch of different images and try a number of different command to see if i experience any unsuccessful copy activities
The original issue (missing support for schema1-embedded name:tag) has just been fixed in #337 . Are there any outstanding failures?
The original issue (missing support for schema1-embedded name:tag) has just been fixed in #337 . Are there any outstanding failures?
@raffaelespazzoli ^^ can we close?
we can close it thanks.
2017-05-11 14:22 GMT-04:00 Aaron Weitekamp notifications@github.com:
The original issue (missing support for schema1-embedded name:tag) has just been fixed in #337 https://github.com/projectatomic/skopeo/pull/337 . Are there any outstanding failures?
@raffaelespazzoli https://github.com/raffaelespazzoli ^^ can we close?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/projectatomic/skopeo/issues/258#issuecomment-300875486, or mute the thread https://github.com/notifications/unsubscribe-auth/AF5I3F4ppseS7_3wH3JwszRCjd4Q7Zcuks5r41HugaJpZM4LA60d .
-- ciao/bye Raffaele
I'm using openshift 3.3.0 (cdk) with integrated registry. when I upload an image I get the following error: I'm running skopeo on fedora 24
skopeo version:
skopeo command and log:
registry log:
I'm not sure if I'm doing something wrong or I'm finding a bug. Thanks.