Giter VIP home page Giter VIP logo

Comments (6)

jkutner avatar jkutner commented on August 16, 2024

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.

jkutner avatar jkutner commented on August 16, 2024

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.

sclevine avatar sclevine commented on August 16, 2024

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.

jkutner avatar jkutner commented on August 16, 2024

@sclevine I'm only suggesting we set HOME to /workspace for the run-image

from lifecycle.

nebhale avatar nebhale commented on August 16, 2024

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.

ekcasey avatar ekcasey commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤ī¸ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.