Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions docs/guide/commands/exec.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,32 @@ sandal exec -env-pass MY_VAR new-york -- env
PATH=/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/sbin
MY_VAR=test_var
```

## Custom Namespaces

Sandal is flexiable to execute your custom process with in different namespace.

### Host

To keep nep process on default namespace while environment is in created container.

```bash
sandal exec --env-all --ns-net host test -- ifconfig
```

### Proccess ID (PID)

System is capable to provisioning new process from other processes namespaces.

```bash
sandal exec --env-all --ns-net pid:5321 test -- ifconfig
```

### File

Jump namespaces which is created from other tools is done by giving path of namespace endpoint.

```bash
ip netns create test
sandal exec --env-all --ns-net file:/var/run/netns/test test -- ifconfig
```
Loading