Bug 1309230 - Cannot docker build from internal docker registry
Cannot docker build from internal docker registry
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Build (Show other bugs)
3.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Ben Parees
Wenjing Zheng
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-17 04:54 EST by Wenjing Zheng
Modified: 2016-05-12 13:10 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-12 13:10:35 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Wenjing Zheng 2016-02-17 04:54:56 EST
Description of problem:
Below warning appears if try to docker build from internal docker registry:
[root@ip-172-18-11-232 test]# oc new-app https://github.com/wzheng1/docker-build1
error: can't look up Docker image "172.30.199.46:5000/wzheng/docker-build@sha256:ff7475c4ecdd40f98b6fd3e45eeec8d158f3f1a95bd9180a75f0f43ac7b7e35a": this repository is HTTP only and requires the insecure flag to import
error: only a partial match was found for "172.30.199.46:5000/wzheng/docker-build@sha256:ff7475c4ecdd40f98b6fd3e45eeec8d158f3f1a95bd9180a75f0f43ac7b7e35a": "172.30.199.46:5000/wzheng/docker-build@sha256:ff7475c4ecdd40f98b6fd3e45eeec8d158f3f1a95bd9180a75f0f43ac7b7e35a"

The argument "172.30.199.46:5000/wzheng/docker-build@sha256:ff7475c4ecdd40f98b6fd3e45eeec8d158f3f1a95bd9180a75f0f43ac7b7e35a" only partially matched the following Docker image or OpenShift image stream:

* Docker image "172.30.199.46:5000/wzheng/docker-build@sha256:ff7475c4ecdd40f98b6fd3e45eeec8d158f3f1a95bd9180a75f0f43ac7b7e35a"
  Use --docker-image="172.30.199.46:5000/wzheng/docker-build@sha256:ff7475c4ecdd40f98b6fd3e45eeec8d158f3f1a95bd9180a75f0f43ac7b7e35a" to specify this image or template


Version-Release number of selected component (if applicable):
openshift v1.1.2-285-gb39b3d8
kubernetes v1.2.0-origin
etcd 2.2.2+git
Docker version 1.8.2-el7, build a01dc02/1.8.2

How reproducible:
always

Steps to Reproduce:
1. Run the following comamnds, this would trigger a docker build,  it will push a new docker images into internal docker registry.
$ oc new-app https://github.com/wzheng1/docker-build
$ oc get bc
NAME           TYPE      FROM      LATEST
docker-build   Docker    Git       1
$ oc get build
NAME             TYPE      FROM      STATUS     STARTED         DURATION
docker-build-1   Docker    Git       Complete   2 minutes ago   54s
$ oc get po
NAME                    READY     STATUS       RESTARTS   AGE
docker-build-1-build    0/1       ExitCode:0   0          25m
docker-build-1-srs9t    1/1       Running      0          24m
$ oc describe po docker-build-1-srs9t|grep "Image"
Image(s):              1172.30.199.46:5000/wzheng/docker-build@sha256:ff7475c4ecdd40f98b6fd3e45eeec8d158f3f1a95bd9180a75f0f43ac7b7e35a

2. Create another git repo, include a docker file, make the  dockfile referencing docker image generated from step 1 - "FROM  172.30.199.46:5000/wzheng/docker-build@sha256:ff7475c4ecdd40f98b6fd3e45eeec8d158f3f1a95bd9180a75f0f43ac7b7e35a"
E.g:  https://github.com/wzheng1/docker-build1

3. Run "oc new-app https://github.com/wzheng1/docker-build1"

Actual results:
Cannot create app

Expected results:
Should can

Additional info:
Comment 1 Wenjing Zheng 2016-02-17 04:55:33 EST
This bug was fixed here before: https://bugzilla.redhat.com/show_bug.cgi?id=1255502.
Comment 2 Ben Parees 2016-02-17 23:33:54 EST
you need to specify --insecure-registry=true.
Comment 3 Wenjing Zheng 2016-02-18 00:34:55 EST
Works when adding --insecure-registry=true, have updated case accordingly. Thanks, Ben!

Note You need to log in before you can comment on or make changes to this bug.