Oc new-app: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 6: Line 6:
=Overview=
=Overview=


A tool that generates an appropriate JSON configuration so OpenShift can build an image based on it. The configuration represents resources inside a [[OpenShift Concepts#Projects|project]]. The command is a shortcut to configure a project with common resources for a standard development workflow.
A tool that generates an appropriate JSON configuration so OpenShift can build an image based on it. The configuration represents resources inside a [[OpenShift Concepts#Projects|project]]. The command is a shortcut to configure a project with common resources for a standard development workflow. Source code, images and templates are specified at this stage. The command looks for images on the new local Docker installation, if available, in the Docker registry and the OpenShift image stream.


If new-app finds a [[Docker Concepts#Dockerfile|Dockerfile]] in the repository, it uses the "docker" build strategy. Otherwise it uses the "source" strategy. The strategy can be explicitly set with --strategy option.
If new-app finds a [[Docker Concepts#Dockerfile|Dockerfile]] in the repository, it uses the "docker" build strategy. Otherwise it uses the "source" strategy. The strategy can be explicitly set with --strategy option.

Revision as of 06:54, 21 November 2017

Internal

Overview

A tool that generates an appropriate JSON configuration so OpenShift can build an image based on it. The configuration represents resources inside a project. The command is a shortcut to configure a project with common resources for a standard development workflow. Source code, images and templates are specified at this stage. The command looks for images on the new local Docker installation, if available, in the Docker registry and the OpenShift image stream.

If new-app finds a Dockerfile in the repository, it uses the "docker" build strategy. Otherwise it uses the "source" strategy. The strategy can be explicitly set with --strategy option.

It can also be used to instantiate a stored template:

oc new-app --template=example-template --param=USERNAME=somevalue