# Container CLI Command Reference > [!IMPORTANT] > This file contains documentation for the CURRENT BRANCH. To find documentation for official releases, find the target release on the [Release Page](https://github.com/apple/container/releases) and click the tag corresponding to your release version. > > Example: [release 0.4.1 tag](https://github.com/apple/container/tree/0.4.1) Command availability may vary depending on your macOS version. ## Core Commands ### `container run` Runs a container from an image. If a command is provided, it will execute inside the container; otherwise the image's default command runs. By default the container runs in the foreground and stdin remains closed unless `-i`/`--interactive` is specified. **Usage** ```bash container run [] [ ...] ``` **Arguments** * ``: Image name * ``: Container init process arguments **Process Options** * `-e, --env `: Set environment variables (format: key=value, or just key to inherit from host) * `--env-file `: Read in a file of environment variables (key=value format, ignores # comments and blank lines) * `--gid `: Set the group ID for the process * `-i, --interactive`: Keep the standard input open even if not attached * `-t, --tty`: Open a TTY with the process * `-u, --user `: Set the user for the process (format: name|uid[:gid]) * `--uid `: Set the user ID for the process * `--ulimit `: Set resource limits (format: `=[:]`) * `-w, --workdir, --cwd `: Set the initial working directory inside the container **Resource Options** * `-c, --cpus `: Number of CPUs to allocate to the container * `-m, --memory `: Amount of memory (1MiByte granularity), with optional K, M, G, T, or P suffix **Management Options** * `-a, --arch `: Set arch if image can target multiple architectures (default: arm64) * `--cap-add `: Add a Linux capability (e.g. `CAP_NET_RAW`, `NET_RAW`, or `ALL`) * `--cap-drop `: Drop a Linux capability (e.g. `CAP_NET_RAW`, `NET_RAW`, or `ALL`) * `--cidfile `: Write the container ID to the path provided * `-d, --detach`: Run the container and detach from the process * `--dns `: DNS nameserver IP address * `--dns-domain `: Default DNS domain * `--dns-option