Open gkwan-ibm opened 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.
hi @dmikusa-pivotal
is there a doc to describe the file structure?
The buildpacks API spec dictates where most things end up, https://github.com/buildpacks/spec/blob/main/buildpack.md.
The OL image built by ci.docker has following file structures
/opt/ol/wlp
/config
/logs
/opt/ol/fixes/
The OL image built by Paketo
/layers/paketo-buildpacks_liberty/open-liberty-runtime-kernel
/layers/paketo-buildpacks_liberty/open-liberty-runtime-kernel/usr/servers/defaultServer
For user experience reason, it is better for the Paketo OL image to have same file structures as ci.docker does.