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

use Buildpacks to build function images from source code #418

Closed
tpiperatgod opened this issue Jul 4, 2022 · 5 comments
Closed

use Buildpacks to build function images from source code #418

tpiperatgod opened this issue Jul 4, 2022 · 5 comments

Comments

@tpiperatgod
Copy link
Contributor

What's the Buildpacks

please refer to this: https://buildpacks.io/docs/

Proposal

buildpacks

The tasks of the "buildpacks" in the above diagram are:

  1. package or compile the source code to an artifact in the form of .jar/.nar/go binary/.py
  2. use the function runner as the base image and place the artifact from step 1 in the specified location of the function runner
  3. export the created OCI image to the specified registry

In this way, we can simplify the process of building function images.

Action items

In order to reach the goal, we need to accomplish the following three objectives.

create stack

Note

learn more about the stack: https://buildpacks.io/docs/concepts/components/stack/

The Build image can be a common operating system image, such as Ubuntu.

The Run image must be the function runner image, which contains the requirements for the function image.

create buildpacks

Note

learn more about the buildpack: https://buildpacks.io/docs/concepts/components/buildpack/

Building function images for different languages will require a varying number of buildpacks.

create builder

Note

learn more about the builder: https://buildpacks.io/docs/concepts/components/builder/

We need to make builder based on stack and buildpacks, which will be repeatedly used to build function images for the same programming language.

@jiangpengcheng
Copy link
Member

what does the function yaml in the diagram mean?

@tpiperatgod
Copy link
Contributor Author

I think it can be ignored since the user can build a function image through pulsarctl directly.

@hpvd
Copy link

hpvd commented Aug 16, 2022

maybe its also interesting for parts of this topic to look into the idea of distroless images, its advantages and the latest tooling, just see #448

@tpiperatgod
Copy link
Contributor Author

Yes, it is common usage in Buildpacks to use distroless images as the Run image for the Stack.

@hpvd
Copy link

hpvd commented Aug 17, 2022

Yes, it is common usage in Buildpacks to use distroless images as the Run image for the Stack.

hey that's interesting to hear!

was mentioning this, because in the issue you were writing:

The Build image can be a common operating system image, such as Ubuntu.

maybe it's an option to think about distroless for all images needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants