Creating Docker from public repository

When you use the web-console from OSE/AppAgile, you find only images which are provided by AppAgile locally:


But if you like to test an external image, you cant use the docker-hub URL.

To do so – use the command line interface:

Login to your environment (./oc login xxx-podname-xxx)

Then create a new app from command-line (phpMyAdmin in that example):

MacKeks:ose szosel$ ./oc new-app phpmyadmin/phpmyadmin

--> Found Docker image 41e518d (3 days old) from Docker Hub for "phpmyadmin/phpmyadmin"
 * An image stream will be created as "phpmyadmin:latest" that will track this image
 * This image will be deployed in deployment config "phpmyadmin"
 * [WARNING] Image "phpmyadmin" runs as the 'root' user which may not be permitted by your cluster administrator
 * Port 80/tcp will be load balanced by service "phpmyadmin"
--> Creating resources with label app=phpmyadmin ...
 ImageStream "phpmyadmin" created
 DeploymentConfig "phpmyadmin" created
 Service "phpmyadmin" created
--> Success
 Run 'oc status' to view your app.
MacKeks:ose szosel$

Voila – go back to the web client and check, how that image is being deployed.

Note. you see the name phpmyadmin/phpmyadmin.

On DockerHub the images are sorted in different folders – if you find the right image on DokerHub – just copy that folde/name combination. The oc-command line will search automatically on the public ressources and installs the image.

From oc-help:

MacKeks:ose szosel$ ./oc new-app -h
Create a new application by specifying source code, templates, and/or images

This command will try to build up the components of an application using images, templates,
or code that has a public repository. It will lookup the images on the local Docker installation
(if available), a Docker registry, an integrated image stream, or stored templates.

If you specify a source code URL, it will set up a build that takes your source code and converts
it into an image that can run inside of a pod. Local source must be in a git repository that has a
remote repository that the server can see. The images will be deployed via a deployment
configuration, and a service will be connected to the first public port of the app. You may either specify
components using the various existing flags or let new-app autodetect what kind of components
you have provided.

If you provide source code, a new build will be automatically triggered.
You can use 'oc status' to check the progress.