Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twoliter fails if build is a symlink #428

Open
cbgbt opened this issue Jan 2, 2025 · 0 comments
Open

Twoliter fails if build is a symlink #428

cbgbt opened this issue Jan 2, 2025 · 0 comments

Comments

@cbgbt
Copy link
Contributor

cbgbt commented Jan 2, 2025

Problem

If the build directory in a Twoliter workspace is a symlink, Twoliter will fail to execute any of its tools from within Docker/BuildKit.

  0.066 /bin/sh: line 1: /host/build/tools/pipesys: No such file or directory

This is because the Twoliter workspace is mounted as /host in the Docker build context, which is unlikely to also contain the symlink target for /host/build. When twoliter attempts to execute a tool, it will be unable to find it.


Proposed Solution

  • Find an alternative mechanism for injecting Twoliter's "tools" into the build context. Buildkit supports adding additional arbitrary "build contexts" to a given build. The host mount in our Dockerfile only seems to be used as a mechanism for getting Twoliter's tools -- perhaps we could explicitly add a context for the tools which follows symlinks.
  • An alternative (though leakier) solution could be to detect that build is a symlink that would "escape" the docker build context and raise an error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant