Comments (6)
In the heroku/pack:18
image used by the heroku/buildpacks
builder image, there is a symlink from /app
to /workspace
, and /workspace
is the HOME. We build our run-image with:
RUN ln -s /workspace /app
RUN useradd -u ${pack_uid} -g ${pack_gid} -ms /bin/bash -d /workspace heroku
(note: the Heroku builds never happened in /app
so we don't need it in the build image)
This works pretty well with all the Heroku buildpacks that use the cnb-shim.
I think this approach is good: accommodate it in the stack image. I would like to move away from /app
because we often hear from users that they aren't building an "app" (it's a "service" or something).
from lifecycle.
that said, i think setting HOME
as /workspace
(or whatever is configured in place of /workspace
) makes sense. But IIRC, there is some reason we can't introduce that to the spec.
from lifecycle.
Where are you setting HOME
to workspace in the Heroku images?
Setting HOME
to /workspace
during build seems risky to me. Tools often use dot-files in HOME
to cache downloads (not necessary for launch) or store credentials (bad for security if they end up in the final image).
from lifecycle.
@sclevine I'm only suggesting we set HOME to /workspace
for the run-image
from lifecycle.
I agree with @sclevine on this that given how many runtimes expose the root of the application (think exploded JAR/WAR files) that overlapping $HOME
with the application directory is problematic. For reference the only CVE ever opened against the CF Java Buildpack was due to this very behavior
from lifecycle.
Given the concerns @sclevine @nebhale have outlined and the lack of activity on this issue, I am going to go ahead and close it.
Feel free to reopen if you would like to restart the discussion.
from lifecycle.
Related Issues (20)
- Target distro name/version not derived from `/etc/os-release` when Docker labels aren't set HOT 3
- `[[targets.distros]]` in `buildpack.toml` is ignored if the run image distro name/version isn't available HOT 3
- CVE(s) found in v0.19.3 HOT 1
- AppDir should be marked as readonly in export.go HOT 6
- Lifecycle fails to build on a stack other than bionic HOT 2
- Source file mtimes are always set to Jan 1, 1980 HOT 5
- Upgrade lifecycle to go1.22.4 HOT 1
- UX: Call out ordering of buildpacks when failing detection HOT 2
- Sign release tags
- Sign released binaries
- Upgrade lifecycle to go1.22.5 HOT 2
- `CNB_TARGET_ARCH` and `CNB_TARGET_OS` not set correctly when using Platform API 0.9 HOT 3
- Add more data to `report.toml`
- CVE(s) found in v0.19.7 HOT 2
- Placeholder for security work
- Security review: recover corrupt caches HOT 7
- Security review: prevent simultaneous builds of applications having the same name HOT 2
- Breaking usage of buildpacks betwen v0.19.6 and v0.20.0 HOT 1
- Upgrade lifecycle to go1.22.6
- CVE(s) found in v0.20.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. đđđ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ī¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lifecycle.