Optional
buildEither a path to a folder in which a Docker build should be run to construct the image for this
Container, or a ContainerBuild object with more detailed build instructions. If image
is also specified, the
built container will be tagged with that name, but otherwise will get an auto-generated image name.
Optional
commandThe command line that is passed to the container. This parameter maps to
Cmd
in the Create a
container
section of the Docker Remote
API
and the COMMAND
parameter to docker run. For more
information about the Docker CMD
parameter, go to
https://docs.docker.com/engine/reference/builder/#cmd.
Optional
cpuNumber of CPUs for the container to use. Maps to the Docker --cpus
option - see
https://docs.docker.com/engine/reference/commandline/run.
Optional
dockerA key/value map of labels to add to the container. This parameter maps to Labels in the Create a container section of the Docker Remote API and the --label option to docker run.
Optional
environmentOptional environment variables to set and make available to the container as it is running.
Optional
functionThe function code to use as the implementation of the contaner. If function
is specified,
neither image
nor build
are legal.
Optional
imageThe image to use for the container. If image
is specified, but not build
, the image will be
pulled from the Docker Hub. If image
and build
are specified, the image
controls the
resulting image tag for the build image that gets pushed.
Optional
memoryThe maximum amount of memory the container will be allowed to use. Maps to the Docker
--memory
option - see
https://docs.docker.com/engine/reference/commandline/run.
This should be supplied in MB. i.e. A value of 1024 would equal one gigabyte.
Optional
memoryThe amount of memory to reserve for the container, but the container will
be allowed to use more memory if it's available. At least one of
memory
and memoryReservation
must be specified. Maps to the Docker
--memory-reservation
option - see
https://docs.docker.com/engine/reference/commandline/run.
This should be supplied in MB. i.e. A value of 1024 would equal one gigabyte.
Optional
portsAn array of ports to publish from the container. Ports are exposed using the TCP protocol. If the [external]
flag is true, the port will be exposed to the Internet even if the service is running in a private network.
Maps to the Docker --publish
option - see
https://docs.docker.com/engine/reference/commandline/run.
Optional
volumesAn array of volume mounts, indicating a volume to mount and a path within
the container at which to mount the volume. Maps to the Docker
--volume
option - see
https://docs.docker.com/engine/reference/commandline/run.
Generated using TypeDoc
Container specifies the metadata for a component of a Service.