Skip to content

Commit

Permalink
Add rfc feedback and add alternative proposal for different buildpack…
Browse files Browse the repository at this point in the history
… UIDs
  • Loading branch information
sambhav committed Jul 22, 2021
1 parent d3aacd4 commit c2e37b1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion text/0000-read-only-build-layers.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,13 @@ Updates to the lifecycle so that `build` layers created by buildpacks should be
# How it Works
[how-it-works]: #how-it-works

The lifecycle will have to layerize the layers marked `build` as `true` during the `build` phase of the lifecycle instead of the `export` phase.
The lifecycle will have to layerize all the necessary buildpack layers (either `launch = true` or `cache = true`) during the `build` phase of the lifecycle instead of the `export` phase.

The layerized output from the `build` phase of lifecycle could be stored at `/<layers>/@exported` (which should not clash with any buildpack IDs) where `<layers>`. The exporter will just read from this to construct the final image.

For example the output could look like `<layers>/@exported/<buildpack-id>/<layer-name>.tar` and `<layers>/@exported/<buildpack-id>/<layer-name>.diffId`


# Drawbacks
[drawbacks]: #drawbacks

Expand All @@ -73,6 +76,7 @@ The layerized output from the `build` phase of lifecycle could be stored at `/<l

We could change the the layer so that it is owned by root or a different user between the build steps of different buildpacks so that subsequent buildpacks cannot modify the layers created by other buildpacks. This would require elevated privileges during the build phase of the lifecycle.

Alternatively we could also allow a buildpack to specify a different build `UID` and `GID` that it wants to run as. This will require the lifecycle to run a specific buildpack with the buildpack specified `UID` and `GID`.

- Why is this proposal the best?

Expand Down

0 comments on commit c2e37b1

Please sign in to comment.