modal container

Manage and connect to running containers.

Usage:

modal container [OPTIONS] COMMAND [ARGS]...

Options:

  • --help: Show this message and exit.

Commands:

  • exec: Execute a command in a container.
  • list: List all containers that are currently running.
  • logs: Show logs for a specific container, streaming while active.
  • stop: Stop a currently-running container and reassign its in-progress inputs.

Execute a command in a container.

Usage:

modal container exec [OPTIONS] CONTAINER_ID COMMAND...

Arguments:

  • CONTAINER_ID: Container ID [required]
  • COMMAND...: A command to run inside the container. [required]

Options:

  • --pty / --no-pty: Run the command using a PTY. [default: pty]
  • --help: Show this message and exit.

List all containers that are currently running.

Usage:

modal container list [OPTIONS]

Options:

  • --json / --no-json: [default: no-json]
  • --help: Show this message and exit.

Show logs for a specific container, streaming while active.

Usage:

modal container logs [OPTIONS] CONTAINER_ID

Arguments:

  • CONTAINER_ID: Container ID [required]

Options:

  • --help: Show this message and exit.

Stop a currently-running container and reassign its in-progress inputs.

This will send the container a SIGINT signal that Modal will handle.

Usage:

modal container stop [OPTIONS] CONTAINER_ID

Arguments:

  • CONTAINER_ID: Container ID [required]

Options:

  • --help: Show this message and exit.