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

[REQ] ability to create containers without creating a spec #528

Open
1 task
sozercan opened this issue Feb 14, 2025 · 4 comments
Open
1 task

[REQ] ability to create containers without creating a spec #528

sozercan opened this issue Feb 14, 2025 · 4 comments
Labels
enhancement New feature or request

Comments

@sozercan
Copy link
Member

sozercan commented Feb 14, 2025

What kind of request is this?

New feature

What is your request or suggestion?

I would like Dalec to be able to create containers from pre-existing runtime dependencies without users having to create a yaml file (similar to https://sozercan.github.io/aikit/docs/create-images#quick-start)

example:
docker buildx build -t oras-jq:latest --load --build-arg="dependencies.runtime=oras,jq" --target azlinux3 ...

This is useful if someone wants to create a minimal container with existing runtime dependencies immediately without hassle of learning how to create and maintain a spec

Are you willing to submit PRs to contribute to this feature request?

  • Yes, I am willing to implement it.
@sozercan sozercan added the enhancement New feature or request label Feb 14, 2025
@cpuguy83
Copy link
Member

You always have to provide docker with a file to build.
This can be provided from stdin, though.
This works today:

docker buildx build --build-arg BUILDKIT_SYNTAX=ghcr.io/azure/dalec/frontend:latest --target=mariner2/container/depsonly -<<<"$(jq -c '.dependencies.runtime += {"jq": {}}' <<<"{}" )"

@cpuguy83
Copy link
Member

I realize we never added tests for depsonly and is currently broken on azlinux3, though.

@adamperlin
Copy link
Contributor

I believe I fixed depsonly for azlinux (and ideally any other RPM distros?) in #493!

@adamperlin
Copy link
Contributor

adamperlin commented Feb 14, 2025

Ok looking at this again and there is currently a bug with depsonly that I am looking into! The intent was to fix that target

update: may or not be a bug, basically depsonly fails in a confusing place if there are no runtime deps in the spec to install. Error handling there could be improved. Otherwise, seems to be working!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants