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

Usage in Docker #63

Closed
gkze opened this Issue Jan 24, 2017 · 8 comments

Comments

Projects
None yet
6 participants
@gkze

gkze commented Jan 24, 2017

What's the best workflow to use Pipenv with Docker?

I am trying to accomplish this with a Django project running inside Docker / Docker Compose.

Any tips / suggestions / ideas?

P.S. also, I am using https://github.com/yyuu/pyenv to automatically activate my virtualenvs and manage local Pythons. Does that not work well with this toolchain?

@kennethreitz

This comment has been minimized.

Contributor

kennethreitz commented Jan 24, 2017

this would be a replacement for that workflow

@gkze

This comment has been minimized.

gkze commented Jan 24, 2017

I see, thank you. Great work on this @kennethreitz!

@gkze gkze closed this Jan 24, 2017

@neverfox

This comment has been minimized.

neverfox commented Jan 26, 2017

Well, pyenv is more than just a virtualenv manager (in fact, that aspect comes only as a plugin). It's real use case is to manage multiple Python versions on a single machine, which seems orthogonal to the use case of pipenv. So I think the question remains if they play nicely together.

@jacebrowning

This comment has been minimized.

Contributor

jacebrowning commented Jan 26, 2017

I believe that #98, which we're in the midst of debugging, is caused by a pyenv incompatibility.

@gsemet

This comment has been minimized.

Contributor

gsemet commented Jun 3, 2017

So, what is the advised workflow in docker ? I have a project using pipenv that requires twisted that cannot be built into my alpine docker. I want to use the provided alpine package py-twisted. Can pipenv install the dependencies directly on the system and not on a virtualenv (it looks like pipenv install --system still creates a virtualenv) ?

@nateprewitt

This comment has been minimized.

Member

nateprewitt commented Jun 3, 2017

@stibbons, yes, you can use --system to install the packages directly on the system. It does create a virtualenv as part of it's initialization check but we're looking into making that more sensible. The created virtualenv won't be utilized unless you run pipenv install without --system.

@gsemet

This comment has been minimized.

Contributor

gsemet commented Jun 3, 2017

Great !

@gsemet

This comment has been minimized.

Contributor

gsemet commented Jun 3, 2017

Does subsequent "pipenv run" knows the latest pipenv install has been executed with --system ? I have lot of issues on travis where (like in docker) I prefere to use the system's python instead of a virtualenv's one. Can pipenv run automatically finds out it need to use system's python?

(i also prefere using exactly the same chain of command between travis/docker and manual dev, instead of having to maintain 2 build scripts) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment