Im installing pipenv in my docker:
RUN pip install pipenv
RUN cd /my/app/path/ && pipenv install
RUN cd /my/app/path/ && pipenv shell
Considering your problem, as I know it the easiest way is to update to the latest version of pipenv
. It is still in development, so problems are fixed very soon.
We are using pipenv
with docker
in production. And we really like it.
There are several things to keep in mind:
--system
flag, so it will install all packages into the system python, and not into the virtualenv
. Since docker
containers do not need to have virtualenv
s--deploy
flag, so your build will fail if your Pipfile.lock
is out of date--ignore-pipfile
, so it won't mess with our setupCheck the official docs to be sure that this information is up-to-date.
All in all:
pipenv install --system --deploy --ignore-pipfile
There's also one more thing. If you are using the same Dockerfile
for both development and production it would be very nice to also use --dev
flag for the development environment only.
Also, check out our django
project template to see the full example: wemake-django-template