Build the Apple Container extension

Turns the empty scaffold into a working Nova extension for Apple Container
and container-compose, in the shape of the Docker Suite extension.

Sidebar (Scripts/Sidebar):
- System, Containers, Images, Volumes and Networks sections
- Containers grouped into compose projects via the com.docker.compose.project
  label container-compose stamps; project rows drive compose up/down/build
  against the matching workspace file
- Lifecycle, shell, logs, inspect, browse and copy commands per resource
- Apple Container publishes no event stream, so the sidebar polls while
  visible and only reloads a section when a fingerprint of its data changes,
  which keeps selection and expansion intact

Hostnames (Scripts/Hostnames.js):
- A container's hostname is <name>.<domain> and the domain lives in Apple
  Container's config.toml, which has no CLI setter, so the Hostname Domain
  preference reads and writes that file directly
- Changing it offers to register the domain with macOS and restart the
  services; the write preserves the file's other tables and its mode

Language support:
- Dockerfile and Compose syntaxes backed by tree-sitter grammars built by
  Tools/build-syntaxes.sh, pinned to revisions that generate ABI 14
- The Compose syntax is named dockercompose because that is the languageId
  docker-language-server recognises compose files by
- docker-language-server is downloaded on first use rather than bundled, at
  roughly 40 MB

Icons are generated by Tools/make-icons.py so they can be regenerated rather
than hand-maintained.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UnSBcR5Lywz5Fbj5FmVbfc
This commit is contained in:
2026-08-18 22:45:14 -03:00
co-authored by Claude Opus 5
parent 0879e5a163
commit 0506f44db3
80 changed files with 5201 additions and 3 deletions
+44
View File
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<syntax name="dockerfile">
<meta>
<name>Dockerfile</name>
<type>script</type>
<preferred-file-extension>dockerfile</preferred-file-extension>
</meta>
<detectors>
<filename priority="1.0">Dockerfile,Containerfile,dockerfile,containerfile</filename>
<extension priority="1.0">dockerfile,containerfile</extension>
<match-content lines="1" priority="0.4">^#\s*syntax\s*=\s*docker</match-content>
<match-content lines="20" priority="0.1">^\s*FROM\s+\S+</match-content>
</detectors>
<comments>
<single>
<expression>#</expression>
</single>
</comments>
<autoclosing-pairs>
<pair open="[" close="]" />
<pair open="{" close="}" />
<pair open="&quot;" close="&quot;" />
</autoclosing-pairs>
<surrounding-pairs>
<pair open="[" close="]" />
<pair open="{" close="}" />
<pair open="&quot;" close="&quot;" />
<pair open="'" close="'" />
</surrounding-pairs>
<injection>
<expression>^(docker|dockerfile|containerfile)$</expression>
</injection>
<tree-sitter language="dockerfile">
<highlights path="dockerfile/highlights.scm" />
<folds path="dockerfile/folds.scm" />
<injections path="dockerfile/injections.scm" />
</tree-sitter>
</syntax>