Support apple's container for docker lang#1306
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1306 +/- ##
==========================================
- Coverage 90.00% 89.99% -0.01%
==========================================
Files 80 80
Lines 15881 15918 +37
==========================================
+ Hits 14293 14325 +32
- Misses 1588 1593 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
📦 Cargo Bloat ComparisonBinary size change: +0.00% (16.7 MiB → 16.7 MiB) Expand for cargo-bloat outputHead Branch ResultsBase Branch Results |
crates/prek/src/languages/docker.rs
Outdated
| #[derive(Debug, Copy, Clone, PartialEq, Eq)] | ||
| enum RuntimeKind { | ||
| Auto, | ||
| Container, |
There was a problem hiding this comment.
This name is a bit confusing. Could we call it something like apple-container instead?
There was a problem hiding this comment.
Works for me, I updated this enum to AppleContainer and similar elsewhere. But I did keep the user-facing name as container for PREK_CONTAINER_RUNTIME since it's the name of the executable (and the package name in homebrew/nix) and needing to use something else there would (at least to me) be pretty counterintuitive / surprising
|
Thanks! |
Adding support for https://github.com/apple/container as a container runtime. As a newer project, it's not yet 100% docker-compatible so needed some special casing (missing
--volume'sZoption and--init)Example: