github.com/containerd/nerdctl@v1.7.7/docs/config.md (about) 1 # Configuring nerdctl with `nerdctl.toml` 2 3 | :zap: Requirement | nerdctl >= 0.16 | 4 |-------------------|-----------------| 5 6 This document describes the configuration file of nerdctl (`nerdctl.toml`). 7 This file is unrelated to the configuration file of containerd (`config.toml`) . 8 9 ## File path 10 - Rootful mode: `/etc/nerdctl/nerdctl.toml` 11 - Rootless mode: `~/.config/nerdctl/nerdctl.toml` 12 13 The path can be overridden with `$NERDCTL_TOML`. 14 15 ## Example 16 17 ```toml 18 # This is an example of /etc/nerdctl/nerdctl.toml . 19 # Unrelated to the daemon's /etc/containerd/config.toml . 20 21 debug = false 22 debug_full = false 23 address = "unix:///run/k3s/containerd/containerd.sock" 24 namespace = "k8s.io" 25 snapshotter = "stargz" 26 cgroup_manager = "cgroupfs" 27 hosts_dir = ["/etc/containerd/certs.d", "/etc/docker/certs.d"] 28 experimental = true 29 ``` 30 31 ## Properties 32 33 | TOML property | CLI flag | Env var | Description | Availability \*1 | 34 |---------------------|------------------------------------|---------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------| 35 | `debug` | `--debug` | | Debug mode | Since 0.16.0 | 36 | `debug_full` | `--debug-full` | | Debug mode (with full output) | Since 0.16.0 | 37 | `address` | `--address`,`--host`,`-a`,`-H` | `$CONTAINERD_ADDRESS` | containerd address | Since 0.16.0 | 38 | `namespace` | `--namespace`,`-n` | `$CONTAINERD_NAMESPACE` | containerd namespace | Since 0.16.0 | 39 | `snapshotter` | `--snapshotter`,`--storage-driver` | `$CONTAINERD_SNAPSHOTTER` | containerd snapshotter | Since 0.16.0 | 40 | `cni_path` | `--cni-path` | `$CNI_PATH` | CNI binary directory | Since 0.16.0 | 41 | `cni_netconfpath` | `--cni-netconfpath` | `$NETCONFPATH` | CNI config directory | Since 0.16.0 | 42 | `data_root` | `--data-root` | | Persistent state directory | Since 0.16.0 | 43 | `cgroup_manager` | `--cgroup-manager` | | cgroup manager | Since 0.16.0 | 44 | `insecure_registry` | `--insecure-registry` | | Allow insecure registry | Since 0.16.0 | 45 | `hosts_dir` | `--hosts-dir` | | `certs.d` directory | Since 0.16.0 | 46 | `experimental` | `--experimental` | `NERDCTL_EXPERIMENTAL` | Enable [experimental features](experimental.md) | Since 0.22.3 | 47 | `host_gateway_ip` | `--host-gateway-ip` | `NERDCTL_HOST_GATEWAY_IP` | IP address that the special 'host-gateway' string in --add-host resolves to. Defaults to the IP address of the host. It has no effect without setting --add-host | Since 1.3.0 | 48 49 The properties are parsed in the following precedence: 50 1. CLI flag 51 2. Env var 52 3. TOML property 53 4. Built-in default value (Run `nerdctl --help` to see the default values) 54 55 \*1: Availability of the TOML properties 56 57 ## See also 58 - [`registry.md`](registry.md) 59 - [`faq.md`](faq.md) 60 - https://github.com/containerd/containerd/blob/main/docs/ops.md#base-configuration (`/etc/containerd/config.toml`)