Commit a8e28fe
committed
fix: resolve Docker build timeouts on Modal runner with tmpfs, pre-pulled images, and BuildKit
Three infrastructure fixes to address slow Docker builds inside Modal
Sandboxes caused by gVisor networking and filesystem overhead:
- Add tmpfs mount for /var/lib/docker in start-dockerd.sh (gVisor requires
tmpfs for overlay2 storage driver; without it Docker falls back to vfs
which is 10-50x slower)
- Pre-pull common base images (node:22-alpine, python:3.12-alpine,
alpine:3.19) into runner image using Modal's optimized image system,
eliminating 140s+ runtime pulls through gVisor netstack
- Export DOCKER_BUILDKIT=1 in sandbox startup to ensure BuildKit is always
enabled for Docker builds1 parent 8662fff commit a8e28fe
1 file changed
Lines changed: 17 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
176 | 181 | | |
177 | 182 | | |
178 | 183 | | |
| |||
214 | 219 | | |
215 | 220 | | |
216 | 221 | | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
217 | 233 | | |
218 | 234 | | |
219 | 235 | | |
| |||
223 | 239 | | |
224 | 240 | | |
225 | 241 | | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | 242 | | |
230 | 243 | | |
231 | 244 | | |
| |||
733 | 746 | | |
734 | 747 | | |
735 | 748 | | |
| 749 | + | |
736 | 750 | | |
737 | 751 | | |
738 | 752 | | |
| |||
0 commit comments