oc import-image fails
oc import-image ibrows/herokuish # error: no image stream named "herokuish" exists, pass --confirm to create and import oc import-image "ibrows/herokuish" --confirm # Importing (ctrl+c to stop waiting) ... # error: unable to determine if the import completed successfully - please run 'oc describe -n backend-php imagestream/herokuish' to see if the tags were updated as expected: image stream watch ended prematurely oc describe -n backend-php imagestream/herokuish # Name: herokuish # Created: About a minute ago # Labels: <none> # Annotations: openshift.io/image.dockerRepositoryCheck=tag "latest" has not been set on repository "ibrows/herokuish" # Docker Pull Spec: 172.30.1.1:5000/backend-php/herokuish # # Tag Spec Created PullSpec Image # latest ibrows/herokuish <not available> <not available>
Thanks for the report, we'll look into this
oc import-imageis used to update metadata of external Docker images used by existing applications. To create a new application based on a pre-built Docker image use:
oc new-app ibrows/herokuish. However such an image does not seem to be available on Dockerhub. Can you please explain what you are trying to do?
it's in a private repository.
i have created a secret and tried to base a build on this image, but it doesn't seem to work.
what i've done:
oc secrets new-dockercfg docker --docker-email='mail' --docker-password='password' --docker-username='username' --docker-server='https://index.docker.io/v1/'
oc secrets new docker .dockercfg=/path/to/.dockercfg
then added it to the service accounts
oc secrets add serviceaccount/builder secrets/docker --for=pull
also added it to
defaultwhich doesn't help either.
if i create a new app like:
oc new-app private/image~https://github.com/path/to/project --strategy=docker --name=test
everything seems to be built correctly (the
pullSecretis added in the buildconfig)
I0421 10:16:11.874270 1 source.go:189] Cloning source from https://github.com/path/to/project W0421 10:16:15.031422 1 source.go:63] Error getting git info: error invoking 'config --get remote.origin.url': exit status 1. Out: , Err: W0421 10:16:15.119054 1 docker.go:196] Error getting git info: error invoking 'config --get remote.origin.url': exit status 1. Out: , Err: Step 0 : FROM private/image Trying to pull repository registry.access.redhat.com/private/image ... not found Trying to pull repository docker.io/private/image ... not found F0421 10:16:19.736064 1 builder.go:185] Error: build error: Error: image private/image:latest not found
even editing the buildconfig and trying different
pullSecretvariations doesn't help
deploying an app with
private/imagelike @dani mentioned seems to pull the image correctly
4:36:59 PM image-1-khrrp Pod Pulled Successfully pulled image "private/image:latest"
Does your last comment mean that it's working now? Is
privatereally the name of your private docker repository or did you anonymize that?
@dani yep obfuscated
and wait for it... it seems that the building now worked
did you change anything?
@munzli No, we didn't change anything. How did you start the builds? Not all variants use the newest build config.