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

Externally defined mixins #25

Closed
pauldavidgilligan opened this issue Oct 8, 2020 · 4 comments
Closed

Externally defined mixins #25

pauldavidgilligan opened this issue Oct 8, 2020 · 4 comments
Labels
type:question A user question

Comments

@pauldavidgilligan
Copy link

Consider a real world application for example a spring boot application that has external interfaces that require the installation of a client binary or some special OS apt dependencies.

With Dockerfile we can achieve this using COPY and RUN commands but with the defined buildpacks here there does not seem to be a way of achieving this.

So the question is how migration more complex dockerfiles into the spring boot buildpacks?

Seems a significant waste to write your own.

Any ideas?

@nebhale nebhale changed the title Externally definded mixins Externally defined mixins Oct 20, 2020
@nebhale
Copy link
Member

nebhale commented Oct 20, 2020

@pauldavidgilligan This is definitely a good point, but out of the scope of this buildpack specifically. We’ve discussed this idea as part of the Cloud Native Buildpack specification and the general consensus is that you should write another buildpack to do this kind of thing.

However, you shouldn’t be required to write a buildpack that is as heavy-weight as what you see in Paketo. We write large codebases in Go because it affords us a level of serviceability (robust testing being the big win) that other styles of buildpacks wouldn’t give us. However, it’s absolutely possible to write a single file bash buildpack, or even something more structured than bash like packfile.

The key here is not to assume that our, admittedly very complex and heavyweight, buildpacks are the only way to write CNB-compatible buildpacks; Dockerfile-weight buildpacks are absolutely possible as well.

@nebhale nebhale added the type:question A user question label Oct 20, 2020
@cldfzn
Copy link

cldfzn commented May 25, 2021

Are you aware of any examples for writing a buildpack to install a package from a package/package manager (e.g. apt-get for bionic)?

@dmikusa
Copy link
Contributor

dmikusa commented May 26, 2021

@cldfzn It is possible. You could write a buildpack that calls apt. There is a v2 cloud foundry buildpack that does this, so it could be a blueprint for how to do this. I don't think it was ever updated to a v3 buildpack though.

For what it's worth, there is an RFC that is meant to address this, Stack Buildpacks. These are buildpacks that are meant to have elevated permissions for installing things like a package manager package.

@dmikusa
Copy link
Contributor

dmikusa commented Sep 29, 2021

I'm going to close out this issue as it's out of scope for a buildpack author.

For anyone following along, I suggest you check out buildpacks/rfcs#172 which is removing the concept of stacks & mixins, as well as buildpacks/rfcs#173 which seems to have supplanted the Stack Buildpacks RFC I previously mentioned.

@dmikusa dmikusa closed this as completed Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question A user question
Projects
None yet
Development

No branches or pull requests

4 participants