Skip to content

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

Open

Description

@rlupton20

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

Activity

  1. bossmc commented on May 29, 2019

    @bossmc
    Contributor

    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?)

  2. cswindle commented on Jun 3, 2019

    @cswindle

    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).

  3. rlupton20 commented on Jun 9, 2019

    @rlupton20
    CollaboratorAuthor

    @bossmc sounds like a reasonable idea.

  4. rlupton20 commented on Jun 9, 2019

    @rlupton20
    CollaboratorAuthor

    #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.

  5. rlupton20 commented on Jun 9, 2019

    @rlupton20
    CollaboratorAuthor

    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
    
  6. rlupton20 commented on Aug 10, 2019

    @rlupton20
    CollaboratorAuthor

    @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.

  7. added
    needs investigationIt's unclear yet how to achieve this, or whether it's worth doing at all
    on Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestneeds investigationIt's unclear yet how to achieve this, or whether it's worth doing at all

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions