Skip to content

Commit c716780

Browse files
authored
docs: add dockercompat yaml example (runfinch#1122)
Signed-off-by: Sam Chew <stchew@amazon.com>
1 parent 5a47eec commit c716780

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,17 @@ Finch has a simple and extensible configuration.
113113

114114
A configuration file at `${HOME}/.finch/finch.yaml` will be generated on first run. Currently, this config file has options for system resource limits for the underlying virtual machine. These default limits are generated dynamically based on the resources available on the host system, but can be changed by manually editing the config file.
115115

116-
For a full list of configuration options, check [the struct here](https://github.com/runfinch/finch/blob/main/pkg/config/config.go#L34).
116+
For a full list of configuration options, check the finch struct for [macOS](pkg/config/config_darwin.go#L32).
117117

118118
An example `finch.yaml` looks like this:
119119

120120
```yaml
121121
# cpus: the amount of vCPU to dedicate to the virtual machine. (required)
122122
cpus: 4
123+
123124
# memory: the amount of memory to dedicate to the virtual machine. (required)
124125
memory: 4GiB
126+
125127
# snapshotters: the snapshotters a user wants to use (the first snapshotter will be set as the default snapshotter)
126128
# Supported Snapshotters List:
127129
# - soci https://github.com/awslabs/soci-snapshotter/tree/main
@@ -132,6 +134,7 @@ memory: 4GiB
132134
# and remove the snapshotter configuration in the containerd config file found at /etc/containerd/config.toml
133135
snapshotters:
134136
- soci
137+
135138
# creds_helpers: a list of credential helpers that will be installed and configured automatically.
136139
# Supported Credential Helpers List:
137140
# - ecr-login https://github.com/awslabs/amazon-ecr-credential-helper
@@ -144,12 +147,14 @@ snapshotters:
144147
# folder entirely. (optional)
145148
creds_helpers:
146149
- ecr-login
150+
147151
# additional_directories: the work directories that are not supported by default. In macOS, only home directory is supported by default.
148152
# For example, if you want to mount a directory into a container, and that directory is not under your home directory,
149153
# then you'll need to specify this field to add that directory or any ascendant of it as a work directory. (optional)
150154
additional_directories:
151155
# the path of each additional directory.
152156
- path: /Volumes
157+
153158
# vmType: sets which Hypervisor to use to launch the VM. (optional)
154159
# Only takes effect when a new VM is launched (only on vm init).
155160
# One of: "qemu", "vz".
@@ -159,6 +164,7 @@ additional_directories:
159164
# NOTE: prior to version 1.2.0, "qemu" was the default, and it will still be the default for
160165
# macOS versions that do not support Virtualization.framework (pre-13.0.0).
161166
vmType: "vz"
167+
162168
# rosetta: sets whether to enable Rosetta as the binfmt_misc handler for x86_64
163169
# binaries inside the VM, as an alternative to qemu user mode emulation. (optional)
164170
# Only takes effect when a new VM is launched (only on vm init).
@@ -169,13 +175,17 @@ vmType: "vz"
169175
# some performance regressions, as noted in this issue:
170176
# https://github.com/lima-vm/lima/issues/1269
171177
rosetta: false
178+
179+
# dockercompat: a configuration parameter to activate finch functionality to accept Docker-like commands and arguments.
180+
# For running DevContainers on Finch, this functionality will convert Docker-like arguments into compatible nerdctl commands and arguments.
181+
dockercompat: true
172182
```
173183
174184
#### Windows
175185
176186
A configuration file at `$env:LOCALAPPDATA\.finch\finch.yaml` will be generated on first run. Currently, this config file does not have options for system resource [limits due to limitations in WSL](https://github.com/microsoft/WSL/issues/8570).
177187

178-
For a full list of configuration options, check [the struct here](pkg/config/config.go#L30).
188+
For a full list of configuration options, check the finch struct for [windows](pkg/config/config_windows.go#L18).
179189

180190
An example `finch.yaml` looks like this:
181191

@@ -190,6 +200,7 @@ An example `finch.yaml` looks like this:
190200
# and remove the snapshotter configuration in the containerd config file found at /etc/containerd/config.toml
191201
snapshotters:
192202
- soci
203+
193204
# creds_helpers: a list of credential helpers that will be installed and configured automatically.
194205
# Supported Credential Helpers List:
195206
# - ecr-login https://github.com/awslabs/amazon-ecr-credential-helper
@@ -205,6 +216,10 @@ creds_helpers:
205216

206217
# sets wsl2 Hypervisor to use to launch the VM. (optional)
207218
vmType: "wsl2"
219+
220+
# dockercompat: a configuration parameter to activate finch functionality to accept Docker-like commands and arguments.
221+
# For running DevContainers on Finch, this functionality will convert Docker-like arguments into compatible nerdctl commands and arguments.
222+
dockercompat: true
208223
```
209224
210225
### FAQ

0 commit comments

Comments
 (0)