paketo-buildpacks / liberty

A Cloud Native Buildpack that provides the Open Liberty and WebSphere Liberty runtimes
Apache License 2.0
6 stars 6 forks source link

The file structures in the OL image bulit by paketo and ci.docker are different #184

Open gkwan-ibm opened 2 years ago

gkwan-ibm commented 2 years ago

The OL image built by ci.docker has following file structures

The OL image built by Paketo

For user experience reason, it is better for the Paketo OL image to have same file structures as ci.docker does.

dmikusa commented 2 years ago

That is not possible at the moment, sorry.

The buildpack spec requires files to be added under /layers. It is required for reasons related to buildpack rebase that I won't go into but also for security reasons. Buildpacks do not run as root so they cannot put files into the locations you referenced. /layers is a special location that is owned by the cnb user/group so buildpacks can write to it.

It might be possible to do this in the future with a builder extension, which can have elevated permissions. That functionality hasn't landed in buildpacks yet though so there's nothing Paketo could do about it now.

I agree with what you're saying, so I'll leave this open as a potential future enhancement. I can't guarantee it'll be implemented or provide any timeframe though, due to the reasons above.

gkwan-ibm commented 2 years ago

hi @dmikusa-pivotal

is there a doc to describe the file structure?

dmikusa commented 2 years ago

The buildpacks API spec dictates where most things end up, https://github.com/buildpacks/spec/blob/main/buildpack.md.