-
name
: the identifier of a container; a random id will be given if absent -
image
: in the form[registry]/image[:tag]
; hyperctl will automatically pull the image if missing -
command
: the shell command to run when the container starts -
entryPoint
: the executable to run when the container starts- The
command
will be appended toentryPoint
as parameters ifentryPoint
is not empty.
- The
-
workdir
: the directory running the container command -
[Deprecated]
ports
: the exposed ports of the container, the ports now is move to the Pod levelcontainerPort
: the listening port inside containerhostPort
: the port exposed in host machineprotocol
:tcp
(default) orudp
-
volumes
: volumes reference to be mounted in the container.path
: the mount pointvolume
: the name of the volume to be mounted, defined in volumes section, or specified indetail
.readOnly
: iftrue
, the mount point will be read only, defaultfalse
detail
: the volume spec. If the volume is defined involumes
section of the pod, thedetail
field could leave null.
-
files
: files reference to be present in the container -
tty
: whether the stdio of the container is a tty device
example:
"containers" : [{
"id": "app",
"image": "repo/image:tag",
"command": ["/bin/sh"],
"workdir": "/root",
"envs": [{
"env": "JAVA_OPT",
"value": "-XMx=256m"
}],
"volumes": [{
"path": "/var/log",
"volume": "name",
"readOnly": false,
"detail": {
"name": "prod_log",
"source": "/var/log/myweb.img",
"format": "raw"
}
}],
"files": [{
"path": "/var/lib/xxx/xxxx",
"filename": "name",
"perm": "0755",
"detail": {
"name": "nginx.conf",
"encoding": "raw",
"uri": "https://s3.amazonaws/bucket/file.conf",
"content": ""
}
}],
"tty": true
}]