Replies: 7 comments
-
The buildpacks/pack#768 issue above mentions some findings around export. It is the Lifecycle and not the Platform (i.e., Pack) that makes the export. Which means that pack exports to the local daemon by default, unless using the There's an issue buildpacks/imgutil#100 to support saving images as archives. Also from buildpacks/lifecycle#423 (comment):
Although performance wise, there's also this from buildpacks/lifecycle#423 (comment):
I would actually be happy to have the CUE binding ask pack to publish to the registry directly instead of trying to pass the image to |
Beta Was this translation helpful? Give feedback.
-
Maybe a silly question but I want to be sure : If we can create a standalone package that exposes a definition in E.g package buildpacks
import (
"alpha.dagger.io/dagger"
)
// Build with buildpacks and push the result to a remote registry
#RemoteImage: {
source: dagger.#Artifact
ref: string
creds: ...
#up: [
// Login to the remote registry
// Build with buildpack
// Push the result to the ref
]
} @samalba @grouville Do you think it's a good idea and should it be a standalone package or do we want it in the standard library? |
Beta Was this translation helpful? Give feedback.
-
@TomChv yeah, but better than just the registry is if we can have pack send to the local daemon (it's what it does by default). We can use #PackBuild {
...
publish: bool
...
} Are you thinking on using the Go library? I can always use Exec to the cli but this way there's no need to install pack. |
Beta Was this translation helpful? Give feedback.
-
For the moment I'm not sure, I have to verify what is necessary to do to use the Go library, I'll update you when I have more information. |
Beta Was this translation helpful? Give feedback.
-
Now I think it's fine to keep it in CUE and call the pack cli in a container (rootless.... no need for binding host socket, like kpack). |
Beta Was this translation helpful? Give feedback.
-
Note: https://blog.codecentric.de/en/2021/10/gitlab-ci-paketo-buildpacks/ TLDR: Use lifecycle directly. Run inside a builder image (which includes everything you need), without having to bind the docker socket (unless you want to build to the local daemon). Also, since it's the lifecycle that does the exporting, we can explore how the output can be integrated with dagger's DAG. Dagger would become the platform then. |
Beta Was this translation helpful? Give feedback.
-
In buildpacks/pack#564 (comment):
Pack is the glue, but we already have a glue 😁 Also, from buildpacks/pack#564 (comment):
|
Beta Was this translation helpful? Give feedback.
-
It would be great if Dagger could support building images with Cloud Native Buildpacks. More specifically, I'd like to integrate with Pack, which is both a Command Line Interface and a Go library.
Apart from executing the pack binary from CUE, either directly or via a custom image, there seems to be 2 ways to support this that I can see.
1. Have pack support a buildkit frontend
There's an issue (buildpacks/pack#768, presentation) investigating the usage of a frontend to make Pack work with BuildKit. It's still a proof of concept right now, the idea being to have this built-in in the future if it's worked out.
A possible downside is that this doesn't support all that Pack can do. But, in any case, I think Dagger should still allow using different frontends.
2. Add cue bindings for pack's Go library
I think this would be ideal. Hope it's ok to paste conversations from Discourse here.
The question from @TomChv is:
@shykes explains further:
And @TomChv replied:
Beta Was this translation helpful? Give feedback.
All reactions