Previously I was using
image: openkbs/jdk11-mvn-py3
and this worked fine. Then I forked that docker image to fingage/jdk17-mvn-py3 and made sure it was public and changed the line:
image: fingage/jdk17-mvn-py3
Now I get an error
rpc error: code = Unknown desc = failed to pull and unpack image "docker.io/fingage/jdk17-mvn-py3:latest": failed to resolve reference "docker.io/fingage/jdk17-mvn-py3:latest": pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
any ideas?
Thanks, Jason
Hello @Jason Novotny
Thank you for reaching out to Atlassian Community!
The error you reported is because that image either does not exist or is a private image. If you access the fingage repository in Dockerhub you can check that there's currently no public image listed with the name jdk17-mvn-py3.
If the image is private, you can use the following syntax in your Bitbucket pipelines yml file to provide the Docker hub credentials :
image:
name: fingage/jdk17-mvn-py3
username: $DOCKER_HUB_USERNAME
password: $DOCKER_HUB_PASSWORD
However, if you want to set the image as public in your docker hub repository, you can follow Dockerhub's documentation to Configure repositories.
Hope that helps! Let me know in case you have any questions.
Thank you, @Jason Novotny .
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're very welcome @Jason Novotny ! Happy to have been of some help :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does not run with "docker hub" images?
I have this YML:
## Depth to clone project
clone:
depth: full
## Use S4G image to manage Salesforce code
image:
## Use image from private Docker Hub
name: s4gconsulting/devkops:latest
username: $DOCKER_HUB_USERNAME
password: $DOCKER_HUB_PASSWORD
email: $DOCKER_HUB_EMAIL
pipelines:
default:
- step:
name: Validate Docker Image
script:
- echo "Private image was pulled"
The result returns a right private image code SHA
But I have this error:
Any ideas? Thanks =)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @ferpaxecosanxez ,
The syntax you have used seems to be correct. Does the UI show any error message when you expand the Build setup section of the logs?
I would recommend trying to re-run the build and check if any error message is shown. If the authentication is wrong, it would be expected that an error would be shown saying that pipeline was not able to pull the image.
Also, make sure that the DOCKER_HUB_USERNAME, DOCKER_HUB_PASSWORD, and DOCKER_HUB_EMAIL are defined as environment variables in the repository or workspace level (see Variables and Secrets ), and that they don't contain any typo/space that might be causing an error when authenticating with docker hub.
Thank you, @ferpaxecosanxez !
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Patrik S , the UI does not show errors and the image was pulled correctly. I have opened this question where I use public images but with the same fail result.
There you have all details and I hope that the community can help me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.