| | 30 | }}} |
| | 31 | |
| | 32 | == イメージのプッシュ |
| | 33 | {{{ |
| | 34 | OpenShiftにログイン |
| | 35 | [root@os-master1 ~]# oc login |
| | 36 | Authentication required for https://os-master1.local:8443 (openshift) |
| | 37 | Username: admin |
| | 38 | Password: |
| | 39 | Login successful. |
| | 40 | |
| | 41 | You don't have any projects. You can try to create a new project, by running |
| | 42 | |
| | 43 | oc new-project <projectname> |
| | 44 | |
| | 45 | イメージをアップロードするプロジェクトを作成 |
| | 46 | [root@os-master1 ~]# oc new-project common |
| | 47 | Now using project "common" on server "https://os-master1.local:8443". |
| | 48 | |
| | 49 | You can add applications to this project with the 'new-app' command. For example, try: |
| | 50 | |
| | 51 | oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-ex.git |
| | 52 | |
| | 53 | レジストリにログイン |
| | 54 | [root@os-master1 ~]# docker login -u $(oc whoami) -p $(oc whoami -t) docker-registry-default.router.default.svc.cluster.local |
| | 55 | Login Succeeded |
| | 56 | |
| | 57 | イメージのプッシュ |
| | 58 | [root@os-master1 ~]# docker push docker-registry-default.router.default.svc.cluster.local/common/nginx:latest |
| | 59 | The push refers to a repository [docker-registry-default.router.default.svc.cluster.local/common/nginx] |
| | 60 | a103d141fc98: Pushed |
| | 61 | 73e2bd445514: Pushed |
| | 62 | 2ec5c0a4cb57: Pushed |
| | 63 | latest: digest: sha256:926b086e1234b6ae9a11589c4cece66b267890d24d1da388c96dd8795b2ffcfb size: 948 |