minishift: Deployment of an app using local image doesn't work
General information
- Minishift version: v1.22.0+7163416
- OS: Linux
- Hypervisor: VirtualBox
Steps to reproduce
- Tag an image as
docker.io/my/imageinside of the VM - Create a deployment that uses this tag
- Get pods
Expected
Deployment started, local image tag is used
Actual
Deployment fails to start, pull error happened
Exact commands to reproduce:
$ eval $(minishift docker-env)
$ oc login -u developer -p developer
Login successful.
You have access to the following projects and can switch between them with 'oc project <projectname>':
* che
myproject
Using project "che".
$ oc new-project proj
Now using project "proj" on server "https://192.168.99.100:8443".
You can add applications to this project with the 'new-app' command. For example, try:
oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-ex.git
to build a new example application in Ruby.
$ docker pull centos/httpd
Using default tag: latest
Trying to pull repository docker.io/centos/httpd ...
latest: Pulling from docker.io/centos/httpd
7dc0dca2b151: Already exists
545a197d72b2: Pull complete
dc9d99a0bee2: Pull complete
c6f417d2b41a: Pull complete
Digest: sha256:6ee354a1a26a54d0aa16ae2b197f826733eb91b54658db2381dadde2f38f3457
Status: Downloaded newer image for docker.io/centos/httpd:latest
$ docker tag centos/httpd docker.io/garagatyi/httpd
$ oc run web --image docker.io/garagatyi/httpd --image-pull-policy=Never
deploymentconfig "web" created
$ oc get pods
NAME READY STATUS RESTARTS AGE
web-1-2z66v 0/1 ErrImageNeverPull 0 1d
web-1-deploy 1/1 Running 0 1d
but when pull policy is IfNotPresent image is pulled from Docker Hub and local one is ignored
$ oc run web4 --image docker.io/garagatyi/httpd --image-pull-policy=IfNotPresent
deploymentconfig "web4" created
$ oc get pods
NAME READY STATUS RESTARTS AGE
web3-1-77jp7 0/1 CrashLoopBackOff 5 1d
web3-1-deploy 1/1 Running 0 1d
web4-1-deploy 1/1 Running 0 1d
web4-1-wqn6z 0/1 Error 0 1d
$ docker images | grep http
centos/httpd latest e23d3fcb4169 5 weeks ago 296MB
garagatyi/httpd latest e23d3fcb4169 5 weeks ago 296MB
garagatyi/httpd latest e23d3fcb4169 5 weeks ago 296MB
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 16 (15 by maintainers)
@LalatenduMohanty @praveenkumar BTW changing image in the deployment from
docker.io/username/latesttousername/image:latestseems to fix the issue