PaaS Q&A

How-To – import imagestream from external docker repository

This topic contains 0 replies, has 1 voice, and was last updated by  Stefan Zosel 7 months, 3 weeks ago.

  • Author
    Posts
  • #770

    Stefan Zosel
    Keymaster

    What has to be done do import images from an external docker repository.

    see https://docs.openshift.com/container-platform/3.3/dev_guide/managing_images.html#importing-tag-and-image-metadata

    When creating an imagestream all images will be imported automatically with creating the imagestream.

    Note: If you wonder that not all images are imported check the masterconfig-file at

    /etc/origin/master/master-config.yaml.

    Check parameter maxImagesBulkImportedPerRepository. If this parameter is not set then by default a maximum of 5 Images will be imported. Set this value to a appropriate value, like 10 in the following example
    ….
    imagePolicyConfig:
    maxImagesBulkImportedPerRepository: 10
    ….

    With the flag –all all images will be imported – unless the number is lower than specified with maxImagesBulkImportedPerRepository.

    oc import-image my-ruby –from=docker.io/openshift/ruby-20-centos7 –all –confirm

    The import completed successfully.

    Name: my-ruby

    Created: Less than a second ago
    Labels:
    Annotations: openshift.io/image.dockerRepositoryCheck=2016-05-06T20:59:30Z
    Docker Pull Spec: 172.30.94.234:5000/demo-project/my-ruby

    Tag Spec Created PullSpec Image

    latest docker.io/openshift/ruby-20-centos7 Less than a second ago docker.io/openshift/ruby-20-centos7@sha256:772c5bf9b2d1e8…

    If you don’t want to import all images but a specific one the use the following syntax

    oc import-image [:] –from= –confirm
    oc import-image appagile-elasticsearch:temp-test-0.0.4 –from=vmapgmucrep01.appacd.tsi-af.de:5000/public/appagile-elasticsearch:temp-test-0.0.4 –confirm

The topic ‘How-To – import imagestream from external docker repository’ is closed to new replies.