You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Image pulling policy on `compose up --pull` with `always|missing|never`
21
+
- Health gating with `depends_on` conditions and `--wait/--wait-timeout`
14
22
15
23
## Building
16
24
@@ -46,6 +54,74 @@ container compose ps
46
54
# etc.
47
55
```
48
56
57
+
### New flags (parity with Docker Compose)
58
+
59
+
-`--pull <policy>`: `always|missing|never` — controls image pull behavior during `up`.
60
+
-`--wait`: block until services reach running/healthy state.
61
+
-`--wait-timeout <seconds>`: maximum wait time for `--wait`.
62
+
63
+
## Volume and Mount Semantics
64
+
65
+
The plugin aligns closely with Docker Compose while mapping to Apple Container’s runtime primitives. There are three user‑facing mount types you can declare in compose; internally they map to two host mechanisms:
- Relative paths resolve to absolute paths using the working directory.
78
+
- Runtime mapping:
79
+
- Mapped as a virtiofs share from the host path to the container path.
80
+
- Read‑only honored via `:ro` or `read_only: true`.
81
+
- Notes:
82
+
- Options like `:cached`, `:delegated`, SELinux flags `:z`/`:Z` are accepted in YAML but currently do not alter behavior; the mount is still a virtiofs host share.
- Define in top‑level `volumes:` (optional if not `external: true`).
90
+
- Runtime mapping:
91
+
- The orchestrator ensures the volume exists (creates if missing and not external), then mounts it using Apple Container’s managed block volume (ext4) and its host mountpoint.
92
+
- Labels set on created volumes: `com.apple.compose.project`, `com.apple.compose.service`, `com.apple.compose.target`, `com.apple.compose.anonymous=false`.
93
+
- Cleanup:
94
+
-`container compose down --volumes` removes non‑external volumes declared in the project.
95
+
96
+
### 3) Anonymous Volumes (bare container paths)
97
+
98
+
- Compose syntax:
99
+
- Short: `- /container/path`
100
+
- Long (equivalent semantics): `type: volume`, `target: /container/path` with no `source`.
101
+
- Runtime mapping:
102
+
- Treated as a named volume with a deterministic generated name: `<project>_<service>_anon_<hash>`.
103
+
- Created if missing and mounted as a managed block volume (ext4) using the volume’s host mountpoint.
104
+
- Labeled with `com.apple.compose.anonymous=true` for lifecycle management.
105
+
- Cleanup:
106
+
-`container compose down --volumes` also removes these anonymous volumes (matched via labels).
107
+
108
+
### 4) Tmpfs (container‑only memory mount)
109
+
110
+
- Compose long form only: `type: tmpfs`, `target: /container/tmp`, `read_only: true|false`.
111
+
- Runtime mapping:
112
+
- An in‑memory tmpfs mount at the container path.
113
+
114
+
### Behavior Summary
115
+
116
+
- Bind mount → virtiofs host share (best for live dev against host files).
117
+
- Named/anonymous volume → managed block volume (best for persisted container data independent of your working tree).
118
+
- Tmpfs → in‑memory ephemeral mount.
119
+
120
+
### Port Publishing (for completeness)
121
+
122
+
- Compose `ports:` entries like `"127.0.0.1:3000:3000"`, `"3000:3000"` are supported.
123
+
- The runtime binds the host address/port and forwards to the container IP/port using a TCP/UDP forwarder.
124
+
49
125
## Build Support
50
126
51
127
The plugin now supports building Docker images directly from your compose file:
@@ -81,6 +157,7 @@ When you run `container compose up`, the plugin will:
0 commit comments