Skip to content

Commit 8d01bd8

Browse files
committed
update the CLI references
Signed-off-by: Wang Xu <[email protected]>
1 parent a56d484 commit 8d01bd8

File tree

11 files changed

+153
-111
lines changed

11 files changed

+153
-111
lines changed

Diff for: reference/attach.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
# attach
22

3-
Attach a specified container in a Pod to TTY
3+
Attach to the input/output of a specified container
44

5-
Usage:
6-
hyperctl attach CONTAINER
5+
```
6+
Usage:
7+
hyperctl attach CONTAINER
78
8-
Help Options:
9-
-h, --help Show this help message
9+
Attach to the input/output of a specified container
10+
11+
Help Options:
12+
-h, --help Show this help message
13+
```

Diff for: reference/cli.md

+23-23
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,33 @@
22

33
```
44
Usage:
5-
6-
hyperctl [OPTIONS] COMMAND [ARGS...]
5+
hyperctl [OPTIONS] COMMAND [ARGS...]
76
87
Command:
9-
10-
attach Attach to the tty of a specified container in a Pod
11-
build Build an image from a Dockerfile
12-
commit Create a new image from a container's changes
13-
create Create a Pod into 'pending' status, but without running it
14-
exec Run a command in a container of a running Pod
15-
images List images
16-
info Display system-wide information
17-
list List all Pods or containers
18-
login Register or log in to a Docker registry server
19-
logout Log out from a Docker registry server
20-
pull Pull an image from a Docker registry server
21-
push Push an image or a repository to a Docker registry server
22-
replace (Linux only) replace the Pod in a running VM with a new one
23-
rm Remove one or more Pods
24-
rmi Remove one or more images
25-
run Create a Pod, and launch a new Pod
26-
start Launch a 'pending' Pod
27-
stop Stop a running Pod, it will become 'pending'
8+
attach Attach to the input/output of a specified container
9+
build Build an image from a Dockerfile
10+
commit Create a new image from a container's changes
11+
create Create a pod or create a container in a pod
12+
exec Run a command in a specified container
13+
images List images
14+
info Display system-wide information
15+
list List all pods or containers
16+
load Load a image from STDIN or tar archive file
17+
login Register or log in to a Docker registry server
18+
logout Log out from a Docker registry server
19+
pause Pause a running pod
20+
pull Pull an image from a Docker registry server
21+
push Push an image or a repository to a Docker registry server
22+
rm Remove one or more pods or containers
23+
rmi Remove one or more images
24+
run Create a pod, and launch the new pod
25+
save Save one or more images to a tar archive (streamed to STDOUT by default)
26+
start Start a pod or container
27+
stop Stop a running pod or container
28+
unpause Unpause a paused pod
2829
2930
Help Options:
30-
31-
-h, --help Show this help message
31+
-h, --help Show this help message
3232
3333
Run 'hyperctl COMMAND --help' for more information on a command.
3434
```

Diff for: reference/create.md

+27-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,31 @@
11
# create
22

3-
Define a Pod and allocate storage, but without starting it. The Pod will stay in `Created` state.
3+
Create a pod or create a container in a pod.
44

5-
Usage:
6-
hyperctl create POD_FILE
5+
```
6+
Usage:
7+
hyperctl create [OPTIONS] [POD_ID] IMAGE [COMMAND] [ARG...]
78
8-
Help Options:
9-
-h, --help Show this help message
9+
Create a pod, or create a container in the pod specified by the POD_ID
10+
11+
Application Options:
12+
-p, --podfile="" read spec from the pod file instead of command line
13+
-y, --yaml pod file in Yaml format instead of JSON
14+
--name="" Assign a name to the container
15+
--workdir="" Working directory inside the container
16+
-t, --tty the run command in tty, such as bash shell
17+
--cpu=1 CPU number for the VM (default: 1)
18+
--memory=128 Memory size (MB) for the VM (default: 128)
19+
--env=[] Set environment variables
20+
--entrypoint="" Overwrite the default ENTRYPOINT of the image
21+
--restart="" Restart policy to apply when a container exits (never, onFailure, always) (default: never)
22+
--log-driver="" Logging driver for Pod
23+
--log-opt= Log driver options
24+
--publish=[] Publish a container's port to the host, format: --publish [tcp/udp:]hostPort:containerPort
25+
--label=[] Add labels for Pod, format: --label key=value
26+
-v, --volume=[] Mount host file/directory as a data file/volume, format: -v|--volume=[[hostDir:]containerDir[:options]]
27+
-c, --container Create container inside a pod
28+
29+
Help Options:
30+
-h, --help Show this help message
31+
```

Diff for: reference/exec.md

+12-7
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,17 @@
22

33
Run a command in a container or a Pod, and attach the current terminal to the command stdio.
44

5-
Usage:
6-
hyperctl exec [OPTIONS] POD_ID:CONTAINER_NAME COMMAND [ARGS...]
5+
```
6+
Usage:
7+
hyperctl exec [OPTIONS] POD|CONTAINER COMMAND [ARGS...]
78
8-
Help Options:
9-
-h, --help Show this help message
10-
-t Allocate a pseudo-TTY
9+
Run a command in a container or a Pod
1110
12-
Example:
13-
hyperctl exec pod-3uhg23po:nginx echo "Hello World"
11+
Application Options:
12+
-d, --detach Not Attach the stdin, stdout and stderr to the process
13+
-t, --tty Allocate a pseudo-TTY
14+
-m, --vm Execute outside of any containers
15+
16+
Help Options:
17+
-h, --help Show this help message
18+
```

Diff for: reference/kill.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Send kill signal to container or Pod
44

55
Usage:
6-
hyperctl kill [OPTIONS] CONTAINER_ID|POD_ID
6+
hyperctl kill [OPTIONS] CONTAINER_ID|POD_ID...
77

88
Help Options:
99
-h, --help Show this help message

Diff for: reference/list.md

+12-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
# list
22

3-
Display the Pod, VM or container information
3+
Display the Pod or container information
44

5-
Usage:
6-
hyperctl list [OPTIONS] [pod|vm|container]
5+
```
6+
Usage:
7+
hyperctl list [OPTIONS] [pod|container]
78
8-
Help Options:
9-
-h, --help Show this help message
10-
-p, --pod podId Only list the contents from specified Pod
11-
-v, --vm vmId Only list the contents from specified VM
9+
list all pods or container information
10+
11+
Application Options:
12+
-p, --pod="" only list the specified pod
13+
14+
Help Options:
15+
-h, --help Show this help message
16+
```

Diff for: reference/replace.md

-16
This file was deleted.

Diff for: reference/rm.md

+12-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
# rm
22

3-
Remove a Pod permantly, cleanup its disk storage.
3+
Remove one or more pods or containers
44

5+
```
6+
Usage:
7+
hyperctl rm [OPTIONS] CONTAINER|POD [CONTAINER|POD...]
58
6-
Usage:
7-
hyperctl rm POD_ID [POD_ID...]
9+
Remove one or more containers/pods
810
9-
Help Options:
10-
-h, --help Show this help message
11+
Application Options:
12+
-c, --container stop container
13+
14+
Help Options:
15+
-h, --help Show this help message
16+
17+
```

Diff for: reference/run.md

+33-32
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,40 @@
11
# run
22

3-
Launch one or multiple Docker images as a Pod, with a new VM instance
4-
5-
Usage:
6-
hyperctl run [OPTIONS] IMAGE [COMMAND] [ARG...]
7-
8-
Create a pod, and launch a new VM to run the pod
9-
10-
Application Options:
11-
-p, --podfile="" Create and Run a pod based on the pod file
12-
-k, --kubernetes="" Create and Run a pod based on the kubernetes pod file
13-
-y, --yaml Create a pod based on Yaml file
14-
--name="" Assign a name to the container
15-
-a, --attach (from podfile) Attach the stdin, stdout and stderr to the container
16-
-d, --detach (from cmdline) Not Attach the stdin, stdout and stderr to the container
17-
--workdir="" Working directory inside the container
18-
-t, --tty the run command in tty, such as bash shell
19-
--cpu=1 CPU number for the VM
20-
--memory=128 Memory size (MB) for the VM
21-
--env=[] Set environment variables
22-
--entrypoint="" Overwrite the default ENTRYPOINT of the image
23-
--restart="" Restart policy to apply when a container exits (never, onFailure, always)
24-
--log-driver="" Logging driver for Pod
25-
--log-opt= Log driver options
26-
--rm Automatically remove the pod when it exits
27-
--publish=[] Publish a container's port to the host, format: --publish [tcp/udp:]hostPort:containerPort
28-
29-
Help Options:
30-
-h, --help Show this help message
31-
32-
Example:
3+
Create a pod, and launch the new pod
4+
5+
```
6+
Usage:
7+
hyperctl run [OPTIONS] IMAGE [COMMAND] [ARG...]
8+
9+
Create and start a pod
10+
11+
Application Options:
12+
-p, --podfile="" read spec from the pod file instead of command line
13+
-y, --yaml pod file in Yaml format instead of JSON
14+
--name="" Assign a name to the container
15+
--workdir="" Working directory inside the container
16+
-t, --tty the run command in tty, such as bash shell
17+
--cpu=1 CPU number for the VM (default: 1)
18+
--memory=128 Memory size (MB) for the VM (default: 128)
19+
--env=[] Set environment variables
20+
--entrypoint="" Overwrite the default ENTRYPOINT of the image
21+
--restart="" Restart policy to apply when a container exits (never, onFailure, always) (default: never)
22+
--log-driver="" Logging driver for Pod
23+
--log-opt= Log driver options
24+
--publish=[] Publish a container's port to the host, format: --publish [tcp/udp:]hostPort:containerPort
25+
--label=[] Add labels for Pod, format: --label key=value
26+
-v, --volume=[] Mount host file/directory as a data file/volume, format: -v|--volume=[[hostDir:]containerDir[:options]]
27+
-a, --attach (from podfile) Attach the stdin, stdout and stderr to the container
28+
-d, --detach (from cmdline) Not Attach the stdin, stdout and stderr to the container
29+
--rm Automatically remove the pod when it exits
30+
31+
Help Options:
32+
-h, --help Show this help message
33+
34+
Example:
3335
hyperctl run -t ubuntu
3436
hyperctl run -t ubuntu:latest
3537
hyperctl run -t ubuntu /bin/bash
3638
hyperctl run -d nginx
3739
hyperctl run -p mypod.json
38-
39-
40+
```

Diff for: reference/start.md

+12-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
# start
22

3-
Launch a `Created` Pod, with a new VM instance
3+
Start a pod or container
44

5-
Usage:
6-
hyperctl start POD_ID
5+
```
6+
Usage:
7+
hyperctl start [OPTIONS] POD_ID|CONTAINER_ID
78
8-
Help Options:
9-
-h, --help Show this help message
9+
Launch a created pod or container
10+
11+
Application Options:
12+
-c, --container start container
13+
14+
Help Options:
15+
-h, --help Show this help message
16+
```

Diff for: reference/stop.md

+12-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
# stop
22

3-
Stop a `Running` Pod, which will return to `Created` state
3+
Stop a running pod or container
44

5-
Usage:
6-
hyperctl stop POD_ID
5+
```
6+
Usage:
7+
hyperctl stop [OPTIONS] CONTAINER_ID|POD_ID
78
8-
Help Options:
9-
-h, --help Show this help message
9+
Stop running container or pod
10+
11+
Application Options:
12+
-c, --container stop container
13+
14+
Help Options:
15+
-h, --help Show this help message
16+
```

0 commit comments

Comments
 (0)