Oc run: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
=External=
=External=


* https://docs.openshift.com/enterprise/latest/cli_reference/basic_cli_operations.html#run
* https://docs.openshift.com/container-platform/latest/cli_reference/basic_cli_operations.html#run


=Internal=
=Internal=
Line 9: Line 9:
=Overview=
=Overview=


<pre>
Create and run a particular image in a container(s).
oc run shelly -n pizzaparty-dev --image=openshift3/ose-deployer --command=true -- bash -c 'while true; do sleep 1; done'
 
</pre>
oc run shelly -n pizzaparty-dev --image=openshift3/ose-deployer --command=true -- bash -c 'while true; do sleep 1; done'
 
oc run tomcat --image=docker.io/novaordis/tomcat:latest --limits=cpu=200m,memory=400Mi --requests=cpu=100m,memory=200Mi
 
This command creates a new deployment configuration, similarly to how [[oc new-app]] does.

Latest revision as of 23:02, 1 February 2018

External

Internal

Overview

Create and run a particular image in a container(s).

oc run shelly -n pizzaparty-dev --image=openshift3/ose-deployer --command=true -- bash -c 'while true; do sleep 1; done'
oc run tomcat --image=docker.io/novaordis/tomcat:latest --limits=cpu=200m,memory=400Mi --requests=cpu=100m,memory=200Mi

This command creates a new deployment configuration, similarly to how oc new-app does.