Workload Remote Exec

Remote execution allows you to launch a process directly inside a workload from the CLI. Unlike SSH Access, which is specific to workspaces and opens an interactive shell, remote exec works with both workspaces and container workloads — including containers that may not have a shell installed.

Command

Use the following command to run a process remotely in a workload:

cs exec -W SANDBOX/WORKLOAD -- command [args...]

The arguments after -- are passed directly to the exec system call, not to a shell. This is important for containers that do not have a shell available.

Standard input, output, and error are piped to and from the local terminal accordingly.

Default User

By default, the command is launched as root. To run as a different user, specify the UID using the -u or --uid flag:

cs exec -W SANDBOX/WORKLOAD -u 1000 -- command

Note that SSH access runs as owner by default (the non-root user), whereas remote exec defaults to root.

See Also