DockerRunOptions

class aws_cdk.core.DockerRunOptions(*, command=None, environment=None, user=None, volumes=None, working_directory=None)

Bases: object

Docker run options.

Parameters
  • command (Optional[List[str]]) – The command to run in the container. Default: - run the command defined in the image

  • environment (Optional[Mapping[str, str]]) – The environment variables to pass to the container. Default: - no environment variables.

  • user (Optional[str]) – The user to use when running the container. Default: - root or image default

  • volumes (Optional[List[DockerVolume]]) – Docker volumes to mount. Default: - no volumes are mounted

  • working_directory (Optional[str]) – Working directory inside the container. Default: - image default

Attributes

command

The command to run in the container.

Default
  • run the command defined in the image

Return type

Optional[List[str]]

environment

The environment variables to pass to the container.

Default
  • no environment variables.

Return type

Optional[Mapping[str, str]]

user

The user to use when running the container.

Default
  • root or image default

Return type

Optional[str]

volumes

Docker volumes to mount.

Default
  • no volumes are mounted

Return type

Optional[List[DockerVolume]]

working_directory

Working directory inside the container.

Default
  • image default

Return type

Optional[str]