Re: How to import private image from hub.docker to ImageStream ?
On 02/23/2016 01:56 PM, Stéphane Klein wrote: I've tried to append : ``` # oc secrets add serviceaccount/default secrets/hub.docker.io --pull # oc secrets add serviceaccount/default secrets/hub.docker.io --for=pull # oc secrets add serviceaccount/default secrets/hub.docker.io # oc secrets add serviceaccount/deployer secrets/hub.docker.io ``` I've always : ``` # oc import-image api The import completed successfully. Name:api Created:3 hours ago Labels: Annotations: openshift.io/image.dockerRepositoryCheck=2016-02-23T09:14:34Z Docker Pull Spec:172.30.27.206:5000/foobar/api TagSpecCreatedPullSpecImage latestapi3 hours agoimport failed: you may not have access to the Docker image "api" ``` Best regards, Stéphane 2016-02-23 12:48 GMT+01:00 Stéphane Klein: 2016-02-23 11:05 GMT+01:00 Maciej Szulik : Have you checked this doc: https://docs.openshift.org/latest/architecture/core_concepts/builds_and_image_streams.html#private-registries Thanks for this url :) I've created my hub.docker.io secret with (I have replaced with my credentials) : ``` oc secrets new-dockercfg SECRET --docker-server=DOCKER_REGISTRY_SERVER --docker-username=DOCKER_USER --docker-password=DOCKER_PASSWORD --docker-email=DOCKER_EMAIL ``` Now I've : ``` # oc get secret hub.docker.io -o json { "kind": "Secret", "apiVersion": "v1", "metadata": { "name": "hub.docker.io", "namespace": "foobar-staging", "selfLink": "/api/v1/namespaces/foobar-staging/secrets/ hub.docker.io", "uid": "3b1b2aa4-da15-11e5-b613-080027143490", "resourceVersion": "19813", "creationTimestamp": "2016-02-23T10:07:22Z" }, "data": { ".dockercfg": ".." }, "type": "kubernetes.io/dockercfg" } ``` When I execute : ``` # oc import-image api The import completed successfully. Name:api Created:2 hours ago Labels: Annotations: openshift.io/image.dockerRepositoryCheck=2016-02-23T09:14:34Z Docker Pull Spec:172.30.27.206:5000/foobar-staging/api TagSpecCreatedPullSpecImage latestapi2 hours agoimport failed: you may not have access to the Docker image "api" ``` Where is my mistake ? how can I say to my ImageStream to use my hub.docker.io secret ? It looks like there's an error in the image-import command if the first import failed, I've created an issue to address that: https://github.com/openshift/origin/issues/7555 Current workaround is to re-create the image stream and import should pick the proper secret. Btw. make sure the server is either: auth.docker.io/token or index.docker.io/v1/ otherwise it won't match the server. The former is new auth endpoint, the latter is old one. Maciej ___ users mailing list users@lists.openshift.redhat.com http://lists.openshift.redhat.com/openshiftmm/listinfo/users
Re: How to import private image from hub.docker to ImageStream ?
I've tried to append : ``` # oc secrets add serviceaccount/default secrets/hub.docker.io --pull # oc secrets add serviceaccount/default secrets/hub.docker.io --for=pull # oc secrets add serviceaccount/default secrets/hub.docker.io # oc secrets add serviceaccount/deployer secrets/hub.docker.io ``` I've always : ``` # oc import-image api The import completed successfully. Name:api Created:3 hours ago Labels: Annotations: openshift.io/image.dockerRepositoryCheck=2016-02-23T09:14:34Z Docker Pull Spec:172.30.27.206:5000/foobar/api TagSpecCreatedPullSpecImage latestapi3 hours agoimport failed: you may not have access to the Docker image "api" ``` Best regards, Stéphane 2016-02-23 12:48 GMT+01:00 Stéphane Klein: > 2016-02-23 11:05 GMT+01:00 Maciej Szulik : > >> Have you checked this doc: >> >> >> https://docs.openshift.org/latest/architecture/core_concepts/builds_and_image_streams.html#private-registries >> >> >> > Thanks for this url :) > > I've created my hub.docker.io secret with (I have replaced with my > credentials) : > > ``` > oc secrets new-dockercfg SECRET --docker-server=DOCKER_REGISTRY_SERVER > --docker-username=DOCKER_USER --docker-password=DOCKER_PASSWORD > --docker-email=DOCKER_EMAIL > ``` > > Now I've : > > ``` > # oc get secret hub.docker.io -o json > { > "kind": "Secret", > "apiVersion": "v1", > "metadata": { > "name": "hub.docker.io", > "namespace": "foobar-staging", > "selfLink": "/api/v1/namespaces/foobar-staging/secrets/ > hub.docker.io", > "uid": "3b1b2aa4-da15-11e5-b613-080027143490", > "resourceVersion": "19813", > "creationTimestamp": "2016-02-23T10:07:22Z" > }, > "data": { > ".dockercfg": ".." > }, > "type": "kubernetes.io/dockercfg" > } > ``` > > When I execute : > > ``` > # oc import-image api > The import completed successfully. > > Name:api > Created:2 hours ago > Labels: > Annotations: > openshift.io/image.dockerRepositoryCheck=2016-02-23T09:14:34Z > Docker Pull Spec:172.30.27.206:5000/foobar-staging/api > > TagSpecCreatedPullSpecImage > latestapi2 hours agoimport failed: you may not have > access to the Docker image "api" > ``` > > Where is my mistake ? how can I say to my ImageStream to use my > hub.docker.io secret ? > > Best regards, > Stéphane > -- Stéphane Klein blog: http://stephane-klein.info cv : http://cv.stephane-klein.info Twitter: http://twitter.com/klein_stephane ___ users mailing list users@lists.openshift.redhat.com http://lists.openshift.redhat.com/openshiftmm/listinfo/users
Re: How to import private image from hub.docker to ImageStream ?
2016-02-23 11:05 GMT+01:00 Maciej Szulik: > Have you checked this doc: > > > https://docs.openshift.org/latest/architecture/core_concepts/builds_and_image_streams.html#private-registries > > > Thanks for this url :) I've created my hub.docker.io secret with (I have replaced with my credentials) : ``` oc secrets new-dockercfg SECRET --docker-server=DOCKER_REGISTRY_SERVER --docker-username=DOCKER_USER --docker-password=DOCKER_PASSWORD --docker-email=DOCKER_EMAIL ``` Now I've : ``` # oc get secret hub.docker.io -o json { "kind": "Secret", "apiVersion": "v1", "metadata": { "name": "hub.docker.io", "namespace": "foobar-staging", "selfLink": "/api/v1/namespaces/foobar-staging/secrets/hub.docker.io ", "uid": "3b1b2aa4-da15-11e5-b613-080027143490", "resourceVersion": "19813", "creationTimestamp": "2016-02-23T10:07:22Z" }, "data": { ".dockercfg": ".." }, "type": "kubernetes.io/dockercfg" } ``` When I execute : ``` # oc import-image api The import completed successfully. Name:api Created:2 hours ago Labels: Annotations: openshift.io/image.dockerRepositoryCheck=2016-02-23T09:14:34Z Docker Pull Spec:172.30.27.206:5000/foobar-staging/api TagSpecCreatedPullSpecImage latestapi2 hours agoimport failed: you may not have access to the Docker image "api" ``` Where is my mistake ? how can I say to my ImageStream to use my hub.docker.io secret ? Best regards, Stéphane ___ users mailing list users@lists.openshift.redhat.com http://lists.openshift.redhat.com/openshiftmm/listinfo/users