[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Dockerfile in OpenShift



Also, note that "translating an image to an app" is what new-app does.

You can run "oc new-app GIT_REPO -o yaml --dry-run" to see what new-app generates, and pipe that directly into the export command:

    oc new-app ... | oc export -f - --as-template=foo > template.yaml

Which generates the final template to a file on disk.

On Jan 19, 2016, at 4:06 AM, Rodolfo Carvalho <rcarvalh redhat com> wrote:

Hi Den,

You don't need to "translate" the Dockerfile to a template. Instead, you can create a Docker build that will build an image out of the Dockerfile and can be deployed in OpenShift.



You can also create a template that will automated the creation of a BuildConfig, a DeploymentConfig, a Service, etc, see this example:


In the example, the BuildConfig.spec.source refers to a git repository that contains a Dockerfile. You can also use an inline Dockerfile as a source of your BuildConfig:


-- 
Rodolfo Carvalho

OpenShift Developer Experience


On Tue, Jan 19, 2016 at 8:43 AM, Den Cowboy <dencowboy hotmail com> wrote:
Hi, I have some Docker images and a Dockerfile.
Now they want to deploy their containers in OpenShift.
Is it possible to translate a whole dockerfile to an OpenShift-template?

_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users




_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]