minishiftのopenshift namesaceにイメージをインポートする

minishift V1.29.0にてopenshift namespaceにイメージをインポートする手順
ようやく判明しました。

# add-on `admin-user` をONにする。

minishiftのadd-on`admin-user`をenableにしてapplyする。

```bash
$ minishift addons enable admin-user
Add-on 'admin-user' enabled

$ minishift addons apply admin-user
-- Applying addon 'admin-user':..
```

# `admin`でログインしてプロジェクトを`openshift`に変更する

`openshift` Namespaceにインポートするため`admin`でログインしプロジェクトを変更します。

```bash
$ oc login $(minishift ip):8443 -u admin
Logged into "https://192.168.42.85:8443" as "admin" using existing credentials.

You have access to the following projects and can switch between them with 'oc project <projectname>':

    default
    kube-dns
    kube-proxy
    kube-public
    kube-system
  * myproject
    openshift
    openshift-apiserver
    openshift-controller-manager
    openshift-core-operators
    openshift-infra
    openshift-node
    openshift-service-cert-signer
    openshift-web-console

Using project "myproject".

$ oc project openshift
Now using project "openshift" on server "https://192.168.42.85:8443".
```


# イメージをインポートする

```bash
$ oc import-image openshift/postgresql-96-rhel7:latest --from=registry.access.redhat.com/rhscl/postgresql-96-rhel7 --confirm
imagestream.image.openshift.io/postgresql-96-rhel7 imported

Name:           postgresql-96-rhel7
Namespace:      openshift
Created:        Less than a second ago
Labels:         <none>
Annotations:        openshift.io/image.dockerRepositoryCheck=2019-01-14T11:49:21Z
Docker Pull Spec:   172.30.1.1:5000/openshift/postgresql-96-rhel7
Image Lookup:       local=false
Unique Images:      1
Tags:           1

latest
  tagged from registry.access.redhat.com/rhscl/postgresql-96-rhel7

  * registry.access.redhat.com/rhscl/postgresql-96-rhel7@sha256:52784d5e55d82076ac5f809ed6d298af6bac2003e2cfe1f0099123deefc45da1
      Less than a second ago

Image Name: postgresql-96-rhel7:latest
Docker Image:   registry.access.redhat.com/rhscl/postgresql-96-rhel7@sha256:52784d5e55d82076ac5f809ed6d298af6bac2003e2cfe1f0099123deefc45da1
Name:       sha256:52784d5e55d82076ac5f809ed6d298af6bac2003e2cfe1f0099123deefc45da1
Created:    Less than a second ago
Annotations:    image.openshift.io/dockerLayersOrder=ascending
Image Size: 116.6MB in 4 layers
Layers:     75.72MB sha256:23113ae36f8e9d98b1423e44673979132dec59db2805e473e931d83548b0be82
        1.223kB sha256:d134b18b98b0d113b7b1194a60efceaa2c06eff41386d6c14b0e44bfe557eee8
        6.795MB sha256:e9c030a1a5e35aacb0fe94238025996b812bafcc8c1422a35d7bda1223da6e9e
        34.04MB sha256:b4b43ee5f56192791068dc1f70645e4b34f03919846cb92968a61f1a10a8857b
Image Created:  7 weeks ago
Author:     <none>
Arch:       amd64
Entrypoint: container-entrypoint
Command:    run-postgresql
Working Dir:    /opt/app-root/src
User:       26
Exposes Ports:  5432/tcp
Docker Labels:  architecture=x86_64
        authoritative-source-url=registry.access.redhat.com
        build-date=2018-11-26T09:22:52.545618
        com.redhat.build-host=cpt-0002.osbs.prod.upshift.rdu2.redhat.com
        com.redhat.component=rh-postgresql96-container
        description=PostgreSQL is an advanced Object-Relational database management system (DBMS). The image contains the client and server programs that you'll need to create, run, maintain and access a PostgreSQL DBMS server.
        distribution-scope=public
        io.k8s.description=PostgreSQL is an advanced Object-Relational database management system (DBMS). The image contains the client and server programs that you'll need to create, run, maintain and access a PostgreSQL DBMS server.
        io.k8s.display-name=PostgreSQL 9.6
        io.openshift.expose-services=5432:postgresql
        io.openshift.s2i.scripts-url=image:///usr/libexec/s2i
        io.openshift.tags=database,postgresql,postgresql96,rh-postgresql96
        io.s2i.scripts-url=image:///usr/libexec/s2i
        maintainer=SoftwareCollections.org <sclorg@redhat.com>
        name=rhscl/postgresql-96-rhel7
        release=32
        summary=PostgreSQL is an advanced Object-Relational database management system
        url=https://access.redhat.com/containers/#/registry.access.redhat.com/rhscl/postgresql-96-rhel7/images/1-32
        usage=docker run -d --name postgresql_database -e POSTGRESQL_USER=user -e POSTGRESQL_PASSWORD=pass -e POSTGRESQL_DATABASE=db -p 5432:5432 rhscl/postgresql-96-rhel7
        vcs-ref=4d1b1f1c6f1fe58893e1d300ad7462ebbde15dd2
        vcs-type=git
        vendor=Red Hat, Inc.
        version=1
Environment:    PATH=/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
        container=oci
        SUMMARY=PostgreSQL is an advanced Object-Relational database management system
        DESCRIPTION=PostgreSQL is an advanced Object-Relational database management system (DBMS). The image contains the client and server programs that you'll need to create, run, maintain and access a PostgreSQL DBMS server.
        STI_SCRIPTS_URL=image:///usr/libexec/s2i
        STI_SCRIPTS_PATH=/usr/libexec/s2i
        APP_ROOT=/opt/app-root
        HOME=/var/lib/pgsql
        BASH_ENV=/usr/share/container-scripts/postgresql/scl_enable
        ENV=/usr/share/container-scripts/postgresql/scl_enable
        PROMPT_COMMAND=. /usr/share/container-scripts/postgresql/scl_enable
        POSTGRESQL_VERSION=9.6
        POSTGRESQL_PREV_VERSION=9.5
        PGUSER=postgres
        APP_DATA=/opt/app-root
        CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/postgresql
        ENABLED_COLLECTIONS=rh-postgresql96
Volumes:    /var/lib/pgsql/data
```