Hi,
My dockerfile extends an image hosted in a private repo in hub.docker.com:
FROM myprivaterepo/image:latest
When building, pipeline fails with:
+ docker build -t $IMAGE_NAME .
Sending build context to Docker daemon 37.27MB
Step 1/11 : FROM myprivaterepo/image:latest
repository myprivaterepo/image not found: does not exist or no pull access
How could I extend my image with private images?
Duh... turns out I had `docker login` missplaced.
For anyone interested in the topic:
options:
docker: true
pipelines:
default:
- step:
script:
# Set $DOCKER_HUB_USERNAME and $DOCKER_HUB_PASSWORD as environment variables in repository settings
- export IMAGE_NAME=myprivaterepo/image:latest
- docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
- docker build -t $IMAGE_NAME .
- docker push $IMAGE_NAME
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.