-
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 -
ports
: the exposed ports of the containercontainerPort
: the listening port inside containerhostPort
: the port exposed in host machineprotocol
:tcp
(default) orudp
-
volumes
: volumes to be mounted in the container.path
: the mount pointvolume
: the name of the volume to be mounted, defined in volumes sectionreadOnly
: iftrue
, the mount point will be read only, defaultfalse
-
files
: files to be present in the containerpath
: the file path in the containerfilename
: the filename defined in files sectionperm
: the file permission, by default0755
-
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
}],
"files": [{
"path": "/var/lib/xxx/xxxx",
"filename": "name",
"perm": "0755"
}],
"ports":[{
"containerPort": 80,
"hostPort": 8000,
}],
"tty": true
}]