Re-opening a ticket for https://github.com/pypa/pipenv/issues/3027#issuecomment-447312579
Any suggestion if the editable package is located outside of the current application?
Let's assume you have this folder structure
/application
-- Dockerfile
-- Pipfile
-- Pipfile.lock
/lib1 # local python package
and I want to install local editable package lib1. My entry in the Pipfile looks like:
lib1 = {path = "./../lib1",editable = true}
And my Dockerfile looks like:
RUN pipenv install --system --deploy
Running cd application && docker build .
is failing with the following error:
ValueError: Invalid path './../lib1'
What is the recommended solution here?
I can't reproduce with exactly the same Pipfile as you describe.
So can you try against master branch?
cd application && docker build .
is going to set your docker context to /application
- at which point everything external to that directory is no longer accessible.
I think you might need to use the project directory as the build context and manually specify the dockerfile.
docker build -f application/Dockerfile .
@haroldtreen Thanks for your reply, that helps clarify the problem. I forgot it was about docker build so your explanation makes sense.
Thanks @haroldtreen this is exactly what I wanted
Most helpful comment
cd application && docker build .
is going to set your docker context to/application
- at which point everything external to that directory is no longer accessible.I think you might need to use the project directory as the build context and manually specify the dockerfile.
docker build -f application/Dockerfile .