Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow a way to use buildLayeredImage #1946

Open
andr-ec opened this issue Apr 1, 2024 · 2 comments
Open

Allow a way to use buildLayeredImage #1946

andr-ec opened this issue Apr 1, 2024 · 2 comments
Assignees
Labels
feature New feature or request triage Issue needs triage

Comments

@andr-ec
Copy link

andr-ec commented Apr 1, 2024

What problem are you trying to solve?

I want to be able to create docker images that are deterministic and reduce the amount of layers that need to be sent to the registry. similar to how is explained in this article: https://xeiaso.net/talks/2024/nix-docker-build/

What solution would you like?

Ideally a command that builds the docker image that is ready to be uploaded to a registry. but it would also be ok if it output a nix file configured with all the existing inputs that has buildLayeredImage implemented.

Since cross compilation is hard it would be fine if it only worked on linux since in our use case it would only be run in ci.

Alternatives you've considered

The current docker generate works but isn't as minimal or as optimal as using buildLayeredImage directly with nix.

@andr-ec andr-ec added feature New feature or request triage Issue needs triage labels Apr 1, 2024
@mohsenari mohsenari self-assigned this Apr 1, 2024
@mohsenari
Copy link
Collaborator

I saw that and it seems like a very good idea. I need to do some testing to make sure an image built on MacOS can be used in Linux. Or if not what is the workaround.

@nhuray
Copy link

nhuray commented Apr 27, 2024

I have exactly the same need.

I would like to build a docker image defining a single layer with all the devbox dependencies.

This base image would be used to build other docker images in a multi-stage build. That base image might also be used in Github action as a container as an alternative to the devbox-install-action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request triage Issue needs triage
Development

No branches or pull requests

3 participants