DevContainers for MacOS¶
Prerequisites¶
- Install VSCode and Extension
To install VSCode, refer to instruction at code.visualstudio.com or your organization administrators.
To install the extension, refer to instructions for the Dev Containers extension.
- Install Finch
To install Finch, refer to Managing Finch:macOS Installation.
-
Initiate a Finch Virtual Machine (vm)
finch vm init -
Modify your
~/.finch/finch.yamlto add the following configuration option. Refer to Configuration Reference for more information.dockercompat: true
Configure VSCode DevContainer Extension Settings¶
Open the extension settings by navigating within the setting window or using the command palette and typing "Dev Containers: Settings"
-
Configure the "Docker Compose Path" to:
<path>/<to>/finch compose -
Disable "Docker Credential Helper"
-
Configure the "Docker Path" to:
<path>/<to>/finch
Working with Docker Compose Projects in Dev Containers:¶
When using docker compose, set the DOCKER_COMPOSE_VERSION to a value > 2.9.0.
- Set the system environment variable within .zshrc and source .zshrc
- Use
export DOCKER_COMPOSE_VERSION=x.x.xfor the current session
⚠️ Note: Finch only supports dash (
-) as the project name separator. However, Dev Container tooling relies on the separator determined bydocker compose version. If the version is below2.9.0, it defaults to using underscores (_), causing name mismatches and container startup failures. To ensure compatibility, set theDOCKER_COMPOSE_VERSIONto>= 2.9.0.