Git submodules in docker
See original GitHub issuepipenv, version 11.10.0
I have a submodule ./dep1
in my git repo and am adding it to pipenv via pipenv install -e dep1
, which works just fine and adds the line
"abc123" = {path = "./dep1", editable = true}
to my Pipfile. Then I use a Dockerfile as follows:
FROM kennethreitz/pipenv
COPY ./app /app
COPY ./dep1 /app/dep1
CMD python3 start.py
where I added the third line, so the submodule is available in the WORKDIR. However, upon docker build
I am getting the following error
+ pipenv install --deploy --system
Installing -e ./dep1…
Error: An error occurred while installing -e ./dep1!
./dep1 should either be a path to a local project or a VCS url beginning with svn+, git+, hg+, or bzr+
This is unexpected, since ./dep1 is a path to a local project, relative to the WORKDIR in the docker image with the Pipfile, which is /app. Am I missing something or is this a bug?
Issue Analytics
- State:
- Created 5 years ago
- Comments:17 (11 by maintainers)
Top Results From Across the Web
Efficient development workflow using Git submodules and ...
Attempt to describe the development workflow based on Docker that we are using daily at Continuous Software. Feel free to make a pull...
Read more >Developing Docker Multiservices Application Using Git ...
Git submodule is one of GIT feature that allow us to keep a GIT repository as a subdirectory of another GIT repository. This...
Read more >Using git submodule during Docker build - Stack Overflow
1 Answer 1 · Keep the orchestration directory · Remove all submodules from that directory · Now clone each service inside the orchestration...
Read more >Managing microservices with dockers and git-submodules
Add docker-compose to describe the local environment. Use the submodules as the code for the dockers and mount them to the container with...
Read more >Use git submodules to install a private, custom python ...
We're going to use git submodules to pull the package into our project directory, install it and then modify our Dockerfile to install...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t think my solution is the proper way, I’m working on another, but essentially, when the pipfile references the local package, the lockfile becomes different for each platform, your host machine and the docker instance since they are in difference places.
pipenv install
creates a virtualenv, and relocks the pipfile and thenpipenv install --deploy --system
uses that new updated lockfile for the install. So we are essentially creating a virtualenv when it’s not needed to sync lockfiles after you install the new local dep…I’m looking into a better Dockerfile solution now.(For the record it was much simpler than that, thankfully)