Skip to content

Commit 949be1e

Browse files
author
OpenShift Bot
authored
Merge pull request #11188 from jtslear/issue-8620
Merged by openshift-bot
2 parents 5c1e463 + d3851ba commit 949be1e

File tree

4 files changed

+27
-8
lines changed

4 files changed

+27
-8
lines changed

docs/generated/oc_by_example_content.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2309,6 +2309,13 @@ Run a particular image on the cluster
23092309
23102310
# Start a single instance of nginx and keep it in the foreground, don't restart it if it exits.
23112311
oc run -i --tty nginx --image=nginx --restart=Never
2312+
2313+
# Start the nginx container using the default command, but use custom
2314+
# arguments (arg1 .. argN) for that command.
2315+
oc run nginx --image=nginx -- <arg1> <arg2> ... <argN>
2316+
2317+
# Start the nginx container using a different command and custom arguments
2318+
oc run nginx --image=nginx --command -- <cmd> <arg1> ... <argN>
23122319
----
23132320
====
23142321

docs/man/man1/oc-run.1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,13 @@ foreground for an interactive container execution. You may pass 'run/v1' to
250250
# Start a single instance of nginx and keep it in the foreground, don't restart it if it exits.
251251
oc run \-i \-\-tty nginx \-\-image=nginx \-\-restart=Never
252252

253+
# Start the nginx container using the default command, but use custom
254+
# arguments (arg1 .. argN) for that command.
255+
oc run nginx \-\-image=nginx \-\- <arg1> <arg2> ... <argN>
256+
257+
# Start the nginx container using a different command and custom arguments
258+
oc run nginx \-\-image=nginx \-\-command \-\- <cmd> <arg1> ... <argN>
259+
253260
.fi
254261
.RE
255262

docs/man/man1/openshift-cli-run.1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,13 @@ foreground for an interactive container execution. You may pass 'run/v1' to
250250
# Start a single instance of nginx and keep it in the foreground, don't restart it if it exits.
251251
openshift cli run \-i \-\-tty nginx \-\-image=nginx \-\-restart=Never
252252

253+
# Start the nginx container using the default command, but use custom
254+
# arguments (arg1 .. argN) for that command.
255+
openshift cli run nginx \-\-image=nginx \-\- <arg1> <arg2> ... <argN>
256+
257+
# Start the nginx container using a different command and custom arguments
258+
openshift cli run nginx \-\-image=nginx \-\-command \-\- <cmd> <arg1> ... <argN>
259+
253260
.fi
254261
.RE
255262

pkg/cmd/cli/cmd/wrappers.go

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -385,16 +385,14 @@ foreground for an interactive container execution. You may pass 'run/v1' to
385385
%[1]s run nginx --image=nginx --overrides='{ "apiVersion": "v1", "spec": { ... } }'
386386
387387
# Start a single instance of nginx and keep it in the foreground, don't restart it if it exits.
388-
%[1]s run -i --tty nginx --image=nginx --restart=Never`
388+
%[1]s run -i --tty nginx --image=nginx --restart=Never
389389
390-
// TODO: uncomment these when arguments are delivered upstream
390+
# Start the nginx container using the default command, but use custom
391+
# arguments (arg1 .. argN) for that command.
392+
%[1]s run nginx --image=nginx -- <arg1> <arg2> ... <argN>
391393
392-
// Start the nginx container using the default command, but use custom
393-
// arguments (arg1 .. argN) for that command.
394-
//%[1]s run nginx --image=nginx -- <arg1> <arg2> ... <argN>
395-
396-
// Start the nginx container using a different command and custom arguments
397-
//%[1]s run nginx --image=nginx --command -- <cmd> <arg1> ... <argN>`
394+
# Start the nginx container using a different command and custom arguments
395+
%[1]s run nginx --image=nginx --command -- <cmd> <arg1> ... <argN>`
398396
)
399397

400398
// NewCmdRun is a wrapper for the Kubernetes cli run command

0 commit comments

Comments
 (0)