Setting Up My Mac Development Environment

August 22, 2025

In my unboxing notes I wrote about forgetting the password I'd just set on day one and finally logging back in through recovery mode. Next came the development environment. Here are my choices and configurations for the proxy client, package manager, and container tools.

I start with project requirements: when only the toolchain and dependencies must match, use containers and .devcontainer/devcontainer.json; when a full VM must be reproducible, consider Vagrant first; for configuring and continuously maintaining existing systems, bring in Ansible as needed. For the history and a detailed comparison of virtualization backends and automation tools, see Know Your Tools.

Basic tools and official downloads

The open-source v2rayN can serve as the proxy client, and Homebrew can manage packages. For containers I chose Podman Desktop. By August 22, 2025, the date of the unboxing, all three projects offered macOS installers through their GitHub Releases pages.

PurposeToolOfficial downloads
Proxy clientv2rayN2dust/v2rayN Releases
Package managerHomebrewHomebrew/brew Releases
Container managementPodman Desktoppodman-desktop/podman-desktop Releases

Expand Assets on the release page and choose the installer matching your operating system and CPU architecture. I've kept links to versions already available then to show how the downloads worked at the time.

Using v2rayN as the proxy client

v2rayN already supported Windows, Linux, and macOS. For example, 7.13.7, released on August 7, 2025, offered v2rayN-macos-arm64.dmg for Apple silicon and v2rayN-macos-64.dmg for Intel Macs, plus ZIP archives.

After installation, configure your own nodes or subscription and use the system proxy or TUN as needed. For VS Code and container HTTP proxy settings, use the listening address and port shown by your client. Port 7890 below is an example, not a claim about v2rayN's default.

Managing developer tools with Homebrew

Homebrew provides one place to install and manage common development tools. It already had a .pkg for graphical installation: 4.6.0, released August 5, 2025, included Homebrew-4.6.0.pkg, which you could download and open in the macOS Installer.

According to the 4.6.0 installation documentation, the default prefix was /opt/homebrew on Apple silicon and /usr/local on Intel. You also needed Xcode Command Line Tools or Xcode. Follow the installer's shell setup instructions so the terminal can find brew.

Once installed, check its version and install tools as needed, such as Git:

brew --version
brew install git

Homebrew manages subsequent tool packages. For Podman Desktop, I installed directly from its own releases page.

Installing Podman Desktop from GitHub

I chose Podman and Podman Desktop for containers. Stability and consistency with production were the main considerations: our production environment already used Podman on Linux, so I wanted to use the same tools locally and reduce differences when switching environments.

Podman's daemonless architecture reduces reliance on a central daemon. Rootless mode runs containers with ordinary user privileges, helping limit exposure associated with elevated privileges. Podman introduction

Podman Desktop was also convenient. It had a graphical interface for managing containers and could configure Compose and connect to Kubernetes for routine inspection and operations.

I downloaded it from the Podman Desktop v1.20.2 release page.

This release offered the following macOS installers:

Mac typeInstaller
Apple silicon, such as M-seriespodman-desktop-1.20.2-arm64.dmg
Intelpodman-desktop-1.20.2-x64.dmg
Universalpodman-desktop-1.20.2-universal.dmg

Open the .dmg, drag the application to Applications, then start Podman Desktop. On first setup, if the Podman engine is missing, follow the onboarding prompts to install it and create and start a Podman machine. macOS installation instructions

There are two version numbers to distinguish: v1.20.2 identifies Podman Desktop, while Podman 5+ in the VS Code documentation below refers to the engine. Desktop is the GUI application. Its version does not establish that the engine satisfies the requirement. Check the command-line version with:

podman --version

Podman on macOS runs through a Linux virtual machine

On macOS, Podman needs a Linux VM called a Podman machine. Podman Desktop can manage it. The actual Linux containers run inside the VM. Podman machine documentation

Using Podman both locally and in production gives me consistent commands and working habits, but the Mac adds a VM layer. Check filesystem mounts, networking, and the CPU architecture of images against the actual project.

Once configured, confirm the machine is running in Podman Desktop's resources view, or check from the command line:

podman machine list
podman info

Opening the Desktop UI is only one check. VS Code also needs the command-line client to connect to the engine. Creating a Podman machine

Set Docker Path to podman in VS Code

The most important setting for Dev Containers is:

{
  "dev.containers.dockerPath": "podman"
}

Put it in VS Code's settings.json. If other settings exist, add this entry alongside them. The project's .devcontainer/devcontainer.json continues to describe the development container itself.

Alternatively, search for dev.containers.dockerPath in VS Code settings and change Dev Containers: Docker Path to podman. Dev Containers will invoke Podman as its container CLI.

The VS Code documentation explains that Podman 5 and later are compatible with most Docker CLI commands, and gives this setting for Linux, Windows, and macOS. The same page notes that alternative Docker-compatible CLIs are outside official support. Verify the specific features your project uses.

Install the Dev Containers extension, ensure the Podman machine is running, and prepare the project configuration. You can then choose Dev Containers: Reopen in Container. If it reports that podman cannot be found, check whether the executable is available to the environment in which VS Code runs.

For installing Claude Code at container creation, connecting a third-party model, and preparing first-run onboarding state, see the Dev Container example in “Claude Code Configuration Notes”. It gives the full devcontainer.json, standalone installation script, and steps for passing API configuration from the host.

Reusing the development container configuration on Windows

I put project tools and dependencies into Dev Containers configuration. On Windows I can reuse the project's .devcontainer/devcontainer.json and referenced Dockerfile or Compose files. I don't need to maintain another Ansible configuration to set up the same project environment.

If a project needs only consistent compilers, runtimes, and developer tools, containers can create that environment without requiring a whole guest OS maintained specifically for the project. The entry point is devcontainer.json. Actual dependencies belong in the referenced image, Dockerfile, Features, or project dependency files. Pinning image versions and toolchains and using dependency lockfiles reduces variation on rebuild. Linux containers on a Mac still typically use a VM underneath, managed by the container runtime. Dev Containers configuration

The Windows host needs VS Code, the Dev Containers extension, and an environment capable of running Linux containers, such as Docker Desktop with its WSL 2 backend or a configured Podman installation. Open the project and choose Dev Containers: Reopen in Container. The files can be reused, but host paths and CPU-specific assumptions still need checking. Getting started with Dev Containers

This removes duplicate project environment setup. Installing host software, configuring the operating system, and managing production servers remain separate jobs.

Introduce Ansible when you need system configuration management

If I create a full Linux VM and want to repeat the configuration of packages, users, files, and services, I can run Ansible on my Mac and manage the Linux guest via SSH. The Mac is the control node, the Linux guest a managed node. Usually only the control node needs Ansible installed. The guest needs SSH, a suitable Python interpreter, and the necessary privileges. A managed Linux target can equally be a physical or cloud server. Ansible control and managed nodes

macOS can run Ansible and can itself be a managed target. For example, when Homebrew already exists on a Mac, the community.general.homebrew module can manage packages and other tasks can maintain configuration files. A Linux playbook needs adaptations for package managers, service mechanisms, and module support before assuming it will work unchanged. macOS as a target, Homebrew module

This was one personal machine. I didn't need to configure new machines in bulk or rebuild the system frequently, so I didn't maintain a separate Ansible playbook for my Mac. I installed host tools through Homebrew and other installers, left project dependencies to Dev Containers, and applied a few system settings directly. These settings were simple. Additional scripts require maintenance and can stop working after system or software upgrades. Whether Ansible is worthwhile depends on complexity and repetition. Even a single machine can benefit if it is frequently reinstalled. Automation would have clearer value if I later needed to standardize several Macs or Linux hosts. Dev Containers and Ansible can be combined if each configuration has a clear home.

English terms for environment setup

TermMeaning in these notes
Development environment setupGeneral term for preparing a development environment, manually or automatically
Infrastructure provisioning / Resource provisioningCreating and allocating resources such as VMs, disks, and networks
Software provisioningInstalling and preparing software inside a machine, the main kind of work Vagrant provisioners do
BootstrappingPreparing the minimum environment needed for later steps, such as installing Python before using Ansible modules
Configuration managementUsing repeatable rules to manage software, configuration files, and service state. Ansible is a common tool.
Dependency installationInstalling a project's dependencies
Day-2 operationsRoutine inspection, updates, and incident handling after a system enters service
Operational automationAutomating everyday operational work
Configuration drift detection and remediationDetecting and correcting differences between expected and actual configuration
Infrastructure lifecycle managementManaging resources through creation, configuration, operation, and retirement

Provisioning depends on context. Infrastructure provisioning may create VMs, disks, and networks. Software provisioning focuses on preparing software within a machine. Provisioning can also be run again after initial setup. Vagrant documentation calls automatic software installation and configuration changes provisioning. Ansible describes installing Python on a target first as bootstrapping. Vagrant Provisioning, Ansible bootstrap example

Day-2 operations means operations after a system enters service, not literally its second day. Ansible can do this work but must be invoked on demand, on a schedule, or by an event. Running a playbook once doesn't leave it continuously correcting configuration in the background. Red Hat lifecycle overview, Scheduled ansible-pull

Version-controlling machine definitions and configuration scripts leads to infrastructure as code (IaC), a management approach rather than the name of a particular installation step. For full development VMs, Vagrant can store the definition and invoke shell scripts or Ansible for provisioning as needed. See the virtualization article's automation comparison.

Start full VMs with UTM, add Vagrant when you need rebuilds

First check whether a container is sufficient. If the project really needs an independent guest kernel, a full OS, or a desktop, I would add tools according to the requirement:

  • Long-term use of a few desktop VMs: create, configure, and run them directly in UTM.
  • Batch configuration and ongoing maintenance of existing Linux guests: use Ansible over SSH when needed. A shell script can cover a few initialization commands.
  • Consistent project-level creation, destruction, and reconstruction of full VMs: consider Vagrant first, managing UTM through the community vagrant_utm provider with a matching box and configuration. This can apply to one host and one guest too.

Consistency has two meanings here. Vagrant makes it easy to recreate a machine from a fixed base, while Ansible focuses on the state of software and configuration within the OS. Both still require constrained image, toolchain, and dependency versions. For a few long-lived VMs with occasional manual configuration, UTM alone is simpler.

Terraform can provision resources in bulk and is not limited to the cloud. Actual support depends on the provider. For my UTM environment on a personal Mac, convenient daily start, login, and rebuild operations mattered more, so I didn't add Terraform just for resource creation. I'd revisit it when managing remote hosts, networks, and cloud resources together with a suitable provider. For overlap, history, and compatibility among Vagrant, Ansible, and Terraform, see Know Your Tools. Terraform introduction, official Vagrant/Terraform comparison

vagrant_utm calls UTM's API. Basic creation and startup do not require a separate QEMU installation. A desktop guest still needs a desktop environment in the box, and its display, networking, and connection requirements must be met. One personal machine can use Vagrant if rebuilds and reuse justify it. UTM provider, UTM box requirements

UTM integrates a customized QEMU. Its usual installation does not consist of just installing a graphical manager and pointing it at Homebrew's QEMU. To control a standalone QEMU installation directly, use its CLI or vagrant-qemu, but that route does not automatically give you UTM's management interface. My choice here was the complete UTM application, with Vagrant added if I needed automated rebuilds. UTM architecture, QEMU provider

Check proxy settings separately for VS Code and the development container

For a VPN or proxy, first identify where a request originates. Local VS Code, the Linux VM, and a shell running inside a container can take different network paths. VS Code downloading an extension doesn't establish that the container's curl can reach the same site.

If a VPN or TUN already covers VM and container traffic, an extra HTTP proxy may be unnecessary. If using an HTTP proxy port exposed by software on the host, tell the relevant program the proxy address. Replace the example port 7890 with your own configuration.

VS Code proxy settings

VS Code's main networking features use the system proxy. For extensions and CLI scenarios that still use http.proxy, add this to local VS Code's settings.json:

{
  "http.proxy": "http://127.0.0.1:7890"
}

The setting has a defined scope. It is not a universal proxy switch for programs inside the container. VS Code networking and proxies

Setting environment variables in devcontainer.json

For a development container created with an image or Dockerfile, merge the following into .devcontainer/devcontainer.json to provide proxy variables to container processes:

{
  "containerEnv": {
    "http_proxy": "http://host.containers.internal:7890",
    "https_proxy": "http://host.containers.internal:7890",
    "no_proxy": "localhost,127.0.0.1,::1"
  }
}

This uses Podman's host.containers.internal to reach the host. On an ordinary isolated container network, 127.0.0.1 refers to the container itself, so the loopback address from local VS Code cannot be copied unchanged. Verify name resolution and port reachability, and ensure the proxy's listening address and firewall permit the connection. Docker Desktop typically uses host.docker.internal. Podman container networking, reaching host services from Docker Desktop

Add service names to no_proxy when they should be reached directly, for example the project's actual database service name. Environment variables affect programs that support and read them.

To affect only VS Code's container terminals, tasks, and debugging processes, use remoteEnv. For a Compose project, put container-wide variables in the service's environment or env_file, while remoteEnv in devcontainer.json can set VS Code-related process variables. Rebuild the container after changing configuration. Dev Containers environment variables

Podman itself may also forward proxy variables. By default it reads the environment of the engine-side Podman process. A remote client therefore gets the server process's environment. A single desktop setting on Mac or Windows need not cover processes inside the container. Podman proxy propagation

Distinguish running a container, building an image, and pulling an image. containerEnv configures runtime and won't by itself fix downloads in Dockerfile builds or image pull failures in the engine. For those, inspect build proxy arguments and the network configuration of the engine or VM. Docker build and runtime proxies

curl needs lowercase http_proxy

Inside a Linux development container, curl reads lowercase http_proxy for its HTTP proxy and ignores uppercase HTTP_PROXY. Both https_proxy and HTTPS_PROXY work for HTTPS. This does not mean all curl proxy variables must be lowercase. I use lowercase throughout the example for consistency.

I remembered a historical security reason for this. Specifically, under CGI a client's incoming Proxy header could become an HTTP_PROXY environment variable on the server. If a program trusted that value as its outbound proxy, external input could redirect requests. Curl deliberately ignores that uppercase name. The OS can still store and pass uppercase variables. curl explanation

Native Windows environment names are generally case-insensitive, and libcurl documents that HTTP_PROXY may still take effect there. A Linux container running on Windows still follows Linux case rules. libcurl environment variables

From a container shell with curl installed, inspect HTTP and HTTPS proxy use separately:

curl -v -I http://example.com
curl -v -I https://example.com

Look at the reported variable and connection destination to distinguish an unread variable from an unreachable proxy host or port.

Managing Compose and Kubernetes in Desktop

Compose support in Podman Desktop is handy. When a project has multiple services, such as an application and its database, describe them in a Compose file. Desktop displays the resulting multi-container application as a group for inspection and management. Compose documentation

Compose needs separate installation and setup. podman compose invokes an external provider, such as Docker Compose or podman-compose. Setting dev.containers.dockerPath alone does not install those tools. Podman Compose command

For Kubernetes, Podman Desktop can connect to an existing cluster, select a context, and deploy. Kind and Minikube integrations are available when a local cluster is required. Prepare the appropriate cluster and connection configuration before using these features. Kubernetes documentation

For me, using Podman in production and managing containers, Compose, and Kubernetes locally through Desktop made this setup convenient.

A Remote SSH note in the Colima documentation

The VS Code container runtime documentation includes a note saying that Colima uses Alpine underneath and doesn't support Remote - SSH. It refers to connecting VS Code's Remote - SSH extension to the VM, which depends on whether the target can run VS Code Server. VS Code Linux requirements

The Colima version assumption in that note is outdated. The Colima FAQ says v0.5.6 and earlier used Alpine, switching to Ubuntu from v0.6.0. Ubuntu VMs no longer face this Alpine-specific limitation. Using Colima containers locally with Dev Containers doesn't require first logging into the VM through Remote - SSH.

I also researched full VMs for cross-platform compilation and testing. For the relationships, history, and selection of QEMU, KVM, Xen, libvirt, VirtualBox, and UTM, plus lighter options such as cross-compilation, see Know Your Tools: The History and Choice of Virtualization Stacks.

Archived under the August 22, 2025 unboxing. The installation account retains Podman Desktop v1.20.2, the version I used. I expanded the technical notes on November 11, 2026. Interfaces and compatibility requirements can change with versions.

© 2025 borui. All rights reserved. This content may be freely reproduced, displayed, modified, or distributed with proper attribution to borui and a link to the article: borui (2025-08-22). Setting Up My Mac Development Environment. https://caiborui.com/blog/2025-08-22-zh-mac-development-environment-provisioning-entrans

@misc{borui2025-cb70825b,
  author = {borui},
  title = {{Setting Up My Mac Development Environment}},
  year = {2025},
  publisher = {borui's blog},
  url = {https://caiborui.com/blog/2025-08-22-zh-mac-development-environment-provisioning-entrans}
}