Use full feature set of dockerTools functions #1427

Closed
opened 2025-03-17 14:55:21 +01:00 by Justinodactylus · 2 comments
Justinodactylus commented 2025-03-17 14:55:21 +01:00 (Migrated from github.com)

When trying to build an OCI image with makes, only the attributes

  • config
  • layers (== contents)
  • (layered)
  • maxLayers
  • extraCommands
  • runAsRoot

are definable by the user. Here is the file that defines this:
github.com/fluidattacks/makes@764adcb18b/src/args/make-container-image/default.nix (L3-L20)

I have the use-case to use a base image for my OCI image, so I need the fromImage attribute for both mentioned dockerTools functions, as well as some other attributes (like name and tag).

It would be best, that the user can decide which attributes he needs and can use all attributes of the dockerTools.buildLayeredImage and dockerTools.buildImage functions with makes.

When trying to build an OCI image with `makes`, only the attributes - `config` - `layers` (== `contents`) - (`layered`) - `maxLayers` - `extraCommands` - `runAsRoot` are definable by the user. Here is the file that defines this: https://github.com/fluidattacks/makes/blob/764adcb18bf08ceefdbfb6ccfb83adfc433e52af/src/args/make-container-image/default.nix#L3-L20 I have the use-case to use a base image for my OCI image, so I need the `fromImage` attribute for both mentioned `dockerTools` functions, as well as some other attributes (like `name` and `tag`). It would be best, that the user can decide which attributes he needs and can use all attributes of the `dockerTools.buildLayeredImage` and `dockerTools.buildImage` functions with `makes`.
Justinodactylus commented 2025-03-17 14:56:55 +01:00 (Migrated from github.com)

I already made all attributes of the mentioned dockerTools functions definable by the user. I will open a PR soon.

I already made all attributes of the mentioned `dockerTools` functions definable by the user. I will open a PR soon.
dsalaza4 commented 2025-04-29 00:58:13 +02:00 (Migrated from github.com)

Hey @Justinodactylus,

We're currently working on deprecating most Makes' builtins in favor of having an extremely simplified CLI for core Makes functionality like makeScript and makeTemplate.

We haven't deprecated makeContainerImage yet because we still depend on it, but I would advise you directly use pkgs.dockerTools for your tasks, as it is the official way of building containers provided by nixpkgs.

Thanks!

Hey @Justinodactylus, We're currently working on deprecating most Makes' builtins in favor of having an extremely simplified CLI for core Makes functionality like `makeScript` and `makeTemplate`. We haven't deprecated `makeContainerImage` yet because we still depend on it, but I would advise you directly use `pkgs.dockerTools` for your tasks, as it is the official way of building containers provided by nixpkgs. Thanks!
This discussion has been locked. Commenting is limited to contributors.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
justin/makes#1427
No description provided.