Importing Docker Images Images From The Public Registry Into OpenShift

I am trying to deploy an Ubuntu Image from the here on OpenShift Online (Next Generation). These are the steps I followed in doing so

$ oc new-project test
$ oc new-app jedisct1/phusion-baseimage-latest

I then deployed from the WebConsole

However I get a failed deploy and an error status of “image pulled back off” on the pod page. Any particular thing that I may be doing wrong?

  • How can I pass secret data to a container
  • Can't set custom configuration file for mysql docker container
  • How to clean saved dockerfiles after build
  • Docker Image layers and ENTRYPOINT sequence
  • Restart Kubernetes pod when change happens on another
  • Correct method of pushing to a docker registry from local
  • Below are the logs of the entire proccess.

    root@home:~# oc new-project test
    Now using project "test" on server "https://api.preview.openshift.com:443".
    
    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-hello-world.git
    
    to build a new hello-world application in Ruby.
    
    root@home:~# oc new-app jedisct1/phusion-baseimage-latest
    --> Found Docker image 7ff0885 (14 hours old) from Docker Hub for "jedisct1/phusion-baseimage-latest"
    
        * An image stream will be created as "phusion-baseimage-latest:latest" that will track this image
        * This image will be deployed in deployment config "phusion-baseimage-latest"
        * The image does not expose any ports - if you want to load balance or send traffic to this component
          you will need to create a service with 'expose dc/phusion-baseimage-latest --port=[port]' later
        * WARNING: Image "phusion-baseimage-latest" runs as the 'root' user which may not be permitted by your cluster administrator
    
    --> Creating resources with label app=phusion-baseimage-latest ...
        imagestream "phusion-baseimage-latest" created
        deploymentconfig "phusion-baseimage-latest" created
    --> Success
        Run 'oc status' to view your app.
    
    root@home:~# oc status
    In project test on server https://api.preview.openshift.com:443
    
    dc/phusion-baseimage-latest deploys istag/phusion-baseimage-latest:latest
      deployment #1 pending on image or update
    
    1 warning identified, use 'oc status -v' to see details.
    
    root@home:~# oc status -v
    In project test on server https://api.preview.openshift.com:443
    
    dc/phusion-baseimage-latest deploys istag/phusion-baseimage-latest:latest
      deployment #1 pending on image or update
    
    Warnings:
      * dc/phusion-baseimage-latest has no readiness probe to verify pods are ready to accept traffic or ensure deployment is successful.
        try: oc set probe dc/phusion-baseimage-latest --readiness ...
    
    View details with 'oc describe <resource>/<name>' or list everything with 'oc get all'.
    
    root@home:~# oc status -v
    In project test on server https://api.preview.openshift.com:443
    
    dc/phusion-baseimage-latest deploys istag/phusion-baseimage-latest:latest
      deployment #2 running for 2 minutes - 1 pod
    

  • error 7#7: *1 upstream prematurely closed connection while reading response header from upstream
  • Docker daemon wont start even after adding user/deleting host environment var etc
  • Changing a Docker container
  • Get docker API engine exec output
  • Automate process during docker push
  • Configure PM2 module with linked docker container
  • 2 Solutions collect form web for “Importing Docker Images Images From The Public Registry Into OpenShift”

    I tried to pull the same image in Openshift online too, and I found out a “manifest unknow error”.

    enter image description here

    This is a compatibility problem with DockerHub, as Clayton states in this answer.

    API error (500): manifest unknown: manifest unknown

    1. using Docker < 1.10 pull the image
    
    2. tag it either as
    
         docker.io/<yourname>/imagename
    
         or
    
         ${INTERNAL_DOCKER_REGISTRY_IP}/openshift/imagename
    
    3. push it using the same tag
    
    4. deploy from that
    

    Using docker < 1.10, you may be sure that the pushed image will be of schema v1 which is importable both by current registry version and docker 1.9.

    Pulling images is no problem, because Docker hub converts it on the fly to schema v1 which has a different digest than the one on the hub. So if you try to pull using this digest you will fail because it isn’t stored on the hub. Thus the deployer will fail because docker fails to pull given digest.

    Basically, you can push it anywhere as long as you use docker < 1.10 so you can be sure that the resulting image manifest will be of schema v1 – such a manifest can be safely consumed by the OpenShift and docker of any version.

    Alternative Approach

    You can also push it to OpenShift Online with any docker version you want. Because OpenShift’s registry stores only v1 schema. Then refer to the pushed image instead of original source on the Docker Hub.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.