che icon indicating copy to clipboard operation
che copied to clipboard

CHE 7 - devfile - image credentials

Open mcapello opened this issue 6 years ago • 5 comments

Hi, I am trying che 7.7 and want to create a workspace from a devfile. I am having problems when the cration try to pull de image from docker hub. Where I supposed to set user / password to do this pull ?

Example: components:

  • alias: dev type: dockerimage image: hub.docker.com/repository/docker/xxxxx mountSources: true

mcapello avatar Jan 17 '20 15:01 mcapello

@mcapello Could you provide the exact error you have?

tolusha avatar Jan 17 '20 17:01 tolusha

The credentials to the private docker registry can be set on Administration page

tolusha avatar Jan 17 '20 17:01 tolusha

Thanks. I try to use docker hub to pull a runtime container in the devfile.yaml Where shoul I put my dockerhub credentials ??

components:

  • alias: dev type: dockerimage image: caperiver/repo:tomcat_base mountSources: true

Also I try creating a secret in the che namespace in k8s, but no luck.

The error is: Error: Failed to run the workspace: "Unrecoverable event occurred: 'Failed', 'Failed to pull image "caperiver/repo:tomcat_base": rpc error: code = Unknown desc = failed to resolve image "docker.io/caperiver/repo:tomcat_base": no available registry endpoint: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed',

mcapello avatar Jan 17 '20 19:01 mcapello

screencast-che openshift io-2020 01 18-15_28_18

tolusha avatar Jan 18 '20 13:01 tolusha

Thanks, setting docker.io did the trick.

mcapello avatar Jan 18 '20 15:01 mcapello