[REQ] ability to create containers without creating a spec
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.
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": {}}' <<<"{}" )"
I realize we never added tests for depsonly and is currently broken on azlinux3, though.
I believe I fixed depsonly for azlinux (and ideally any other RPM distros?) in #493!
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!
@cpuguy83 can we close this?