pub struct Config {
pub user: Option<String>,
pub exposed_ports: Option<HashSet<String>>,
pub env: Option<Vec<String>>,
pub cmd: Option<Vec<String>>,
pub entrypoint: Option<Vec<String>>,
pub volumes: Option<HashSet<String>>,
pub working_dir: Option<String>,
pub labels: Option<HashMap<String, String>>,
pub stop_signal: Option<String>,
}
Expand description
The execution parameters which SHOULD be used as a base when running a container using the image.
Fields§
§user: Option<String>
The username or UID which is a platform-specific structure
that allows specific control over which user the process run as. This acts as a default value to use when the value is
not specified when creating a container. For Linux based
systems, all of the following are valid: user
, uid
,
user:group
, uid:gid
, uid:group
, user:gid
. If group
/gid
is
not specified, the default group and supplementary groups
of the given user
/uid
in /etc/passwd
from the container are
applied.
exposed_ports: Option<HashSet<String>>
A set of ports to expose from a container running this
image. Its keys can be in the format of: port/tcp
, port/udp
,
port
with the default protocol being tcp
if not specified.
These values act as defaults and are merged with any
specified when creating a container.
env: Option<Vec<String>>
Entries are in the format of VARNAME=VARVALUE
.
cmd: Option<Vec<String>>
Default arguments to the entrypoint of the container.
entrypoint: Option<Vec<String>>
A list of arguments to use as the command to execute when the container starts..
volumes: Option<HashSet<String>>
A set of directories describing where the process is likely write data specific to a container instance.
working_dir: Option<String>
Sets the current working directory of the entrypoint process in the container.
labels: Option<HashMap<String, String>>
The field contains arbitrary metadata for the container. This property MUST use the annotation rules.
stop_signal: Option<String>
The field contains the system call signal that will be sent
to the container to exit. The signal can be a signal name
in the format SIGNAME
, for instance SIGKILL
or SIGRTMIN+3
.