1.oc project chicago选择使用的项目。oc new-app --docker-image=workstation.lab.example.com:5000/rhscl/php-70-rhel7 --insecure-registry http://workstation.lab.example.com/php-helloworld --name=mordor创建一个新应用, --docker-image=workstation.lab.example.com:5000/rhscl/php-70-rhel7指明镜像,http://workstation.lab.example.com/php-helloworld指明仓库,--name=mordor指明名称。
[student@workstation ~]$ oc project chicago
Now using project "chicago" on server "https://master.lab.example.com:8443".
[student@workstation ~]$ oc new-app --docker-image=workstation.lab.example.com:5000/rhscl/php-70-rhel7 --insecure-registry http://workstation.lab.example.com/php-helloworld --name=mordor
--> Found Docker image 9e23736 (19 months old) from workstation.lab.example.com:5000 for "workstation.lab.example.com:5000/rhscl/php-70-rhel7"
Apache 2.4 with PHP 7.0
-----------------------
Platform for building and running PHP 7.0 applications
Tags: builder, php, php70, rh-php70
* An image stream will be created as "php-70-rhel7:latest" that will track the source image
* The source repository appears to match: php
* A source build using source code from http://workstation.lab.example.com/php-helloworld will be created
* The resulting image will be pushed to image stream "mordor:latest"
* Every time "php-70-rhel7:latest" changes a new build will be triggered
* This image will be deployed in deployment config "mordor"
* Port 8080/tcp will be load balanced by service "mordor"
* Other containers can access this service through the hostname "mordor"
--> Creating resources ...
imagestream "php-70-rhel7" created
imagestream "mordor" created
buildconfig "mordor" created
deploymentconfig "mordor" created
service "mordor" created
--> Success
Build scheduled, use 'oc logs -f bc/mordor' to track its progress.
Run 'oc status&#