withCommand method

DockerContainer withCommand(
  1. Object command
)

Overrides the default command run by the container.

command may be a String (split on spaces/quotes at runtime) or a List<String> (used as-is). An assert checks the type at debug time.

Returns this for chaining.

Implementation

DockerContainer withCommand(Object command) {
  assert(
    command is String || command is List<String>,
    'command must be a String or List<String>',
  );
  _command = command;
  return this;
}