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

Are there nice ways to get git (with submodules) working inside containers #16

Open
rlupton20 opened this issue May 29, 2019 · 6 comments
Labels
enhancement New feature or request needs investigation It's unclear yet how to achieve this, or whether it's worth doing at all

Comments

@rlupton20
Copy link
Collaborator

e.g. git submodule update --init is bound to fail since it uses absolute paths.

@bossmc
Copy link
Collaborator

bossmc commented May 29, 2019

Could/should floki mount the working dir at its path in the host (rather than at /src)? Probably hidden behind a config flag (as your init script needs to be aware of this... maybe add a WORKDIR too?)

@cswindle
Copy link
Member

cswindle commented Jun 3, 2019

This works better for rust as well, as if you change the path it recompiles everything (which is fine if you always use floki for everything, but a pain otherwise).

@rlupton20
Copy link
Collaborator Author

@bossmc sounds like a reasonable idea.

@rlupton20 rlupton20 added the enhancement New feature or request label Jun 9, 2019
@rlupton20
Copy link
Collaborator Author

#19 adds an environment variable which contains the host working directory (FLOKI_HOST_WORKDIR), since that seems to be the absolute minimum needed (I think bind mounts would unlock the rest, in a pinch).

I'll probably end up forwarding the mount path too, but I want to think and test it a little more.

@rlupton20
Copy link
Collaborator Author

Actually, simpler than bind mounts, a symlink might do it.

init:
  - mkdir -p $(dirname $FLOKI_HOST_WORKDIR)
  - ln -s $FLOKI_HOST_WORKDIR link
  - cd link

@rlupton20
Copy link
Collaborator Author

@bossmc don't know why I've been sitting on the idea of mirroring the host path as an option for so long. It just occurred to me today it makes enough things easier that it's worth doing.

Will see if I can get to it this weekend/week.

@rlupton20 rlupton20 added the needs investigation It's unclear yet how to achieve this, or whether it's worth doing at all label Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs investigation It's unclear yet how to achieve this, or whether it's worth doing at all
Projects
None yet
Development

No branches or pull requests

3 participants