[HN Gopher] Modus: A language for building Docker/OCI container ...
___________________________________________________________________
Modus: A language for building Docker/OCI container images
Author : mrigger
Score : 41 points
Date : 2022-08-03 14:16 UTC (8 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| awinter-py wrote:
| eternal wishlist item for container builds: package manager
| integration. That means per-file caching for library downloads,
| out of order installation for when you change one thing in your
| dependency file.
|
| (you can kind of make the caching happen with buildkit but it's
| annoying to set up)
|
| I'm not sure any layer DAG tool will solve the packaging issue
| because dags are inherently ordered right?
|
| cloud providers and users are probably aligned here in terms of
| goals: faster builds, smaller incremental deploys
| arccy wrote:
| give up the dag and be more declarative
|
| https://github.com/chainguard-dev/apko
| awinter-py wrote:
| love this, but sounds from chainguard dev's tweet[1] like
| these images are single-layer? will that require a full
| rebuild + full re-transfer on every deploy?
|
| 1. https://twitter.com/puerco/status/1542018385550123008
| verdverm wrote:
| You might see real solutions with BuildKit's new FS merge
| feature. This might be possible today with https://dagger.io
| which exposes that feature
| awinter-py wrote:
| _thank you_. will try them out
| stoplying1 wrote:
| It looks like nearly the same primitives with the same
| reproducability problems of every non-Bazel, non-nix solution.
| Why would one learn this instead of just using Nix to create
| images and getting more actual tangible benefits?
| darthrupert wrote:
| Because Nix is a convoluted mess that is nearly impossible to
| learn, perhaps?
| rgoulter wrote:
| That somewhat overstates it, but sure.
|
| I think the point is, what trade-offs are you paying such
| that you'd be better off using Modus, but not a Dockerfile or
| a Nix expression. -- If you want to benefit from nicer
| programmatic building of Dockerfiles, and can afford the risk
| of adopting some non-mainstream technology, you're probably
| better off trying Nix than this.
| dboreham wrote:
| Bazel and Nix stand out as the two things that recently a) I've
| heard about then initially investigated, concluding that they
| look promising then b) people who I trust who have used them in
| depth tell me to avoid at all costs.
| rgoulter wrote:
| Nix is wonderful to use for personal workstations & such. I'd
| suggest if the idea of purely declaring a package as a
| function of its inputs sounds interesting to you, it's well
| worth taking time to look into using Nix.
|
| I think in terms of adopting in a team environment.. I don't
| think it's a good idea for a company to adopt high-cost-high-
| reward tools at a place without at least 3 developers who
| know the technology well. (You don't want just 1 dev knowing
| it; and you want slack in case 1 quits or whatever).
| OJFord wrote:
| I hadn't realised you could use Nix for building images, or at
| least not standalone. An article:
| https://thewagner.net/blog/2021/02/25/building-container-ima...
| yewenjie wrote:
| There is also https://nixery.dev/ which lets you get Docker
| images with arbitrary Nix packages - useful for quick
| hacking.
| rmorey wrote:
| woah - this is great, thanks
| MuffinFlavored wrote:
| Kind of confusing. NixOS vs Nix the language...
|
| You use Nix the language to build Docker images and avoid
| the NixOS CLI tools/runtime?
| k__ wrote:
| Nix the package manager.
|
| Nix the language.
|
| NixOS the Linux built with Nix as it's default package
| manager that uses the Nix language.
| MuffinFlavored wrote:
| Nix the language can compile OCI (Open Container
| Initiative) format images that can be
| deployed/ran/executed via Docker or k8s?
|
| Or is that Nix the package manager? Does Nix the package
| manager compile Nix the language images?
| kevinmgranger wrote:
| I'm not familiar enough to speak to Bazel or Nix, but do they
| handle all of the advantages listed on the modus site?
| https://modus-continens.com/#parameterised-builds
| coryrc wrote:
| Yes, and then some.
| mrigger wrote:
| More information at https://modus-continens.com/.
___________________________________________________________________
(page generated 2022-08-03 23:01 UTC)