mirror of
https://github.com/cirruslabs/macos-image-templates.git
synced 2026-10-18 04:42:43 +02:00
19bde7722dac5b2e417ce2d23db64f3e270e4bb9
macOS Packer Templates for Cirrus CI
Repository with Packer templates to build VMs to use with Cirrus CI.
macos-monterey-vanillaimage nothing pre-installedmacos-monterey-baseimage has onlybrewpre-installedmacos-monterey-xcode:Nimage is based ofmacos-monterey-baseand hasXcode NwithFlutterpre-installed
See a full list of VMs available on Cirrus CI here.
Building Vanilla Image
First, create a monterey-vanilla VM from the latest available IPSW with following command:
tart create --from-ipsw=latest --disk-size=25 monterey-vanilla
Start the VM and use UI to change some settings:
tart run monterey-vanilla
- Disable Lock Screen. Preferences -> Lock Screen -> disable "Require Password" after 5.
- Disable Screen Saver.
- Enable Auto-Login. Users & Groups -> Login Options -> Automatic login -> admin.
- Allow SSH. Sharing -> Remote Login
- Open Safari. Preferences -> Advanced -> Show Developer menu. Develop -> Allow Remote Automation.
- Run
sudo visudoin Terminal, find%admin ALL=(ALL) ALLaddadmin ALL=(ALL) NOPASSWD: ALLto allow sudo without a password.
Shutdown macOS.
Building Base Image
packer build templates/base.pkr.hcl
Building Xcode Images
packer build -var xcode_version="13.4" templates/xcode.pkr.hcl
Languages
HCL
65%
Shell
20.3%
Objective-C
12.3%
C
2.4%