r/Python • • Jul 29 '18

Found it funny ;)

Post image
1.6k Upvotes

147 comments sorted by

View all comments

0

u/[deleted] Jul 29 '18

[deleted]

11

u/[deleted] Jul 29 '18

I really like pipenv, especially in conjunction with Docker it's super useful. :)

4

u/bachkhois Jul 29 '18

Are you using pipenv inside Docker container?

1

u/dogfish182 Jul 29 '18

We do this, works great

8

u/bachkhois Jul 29 '18

Why do you have to create a virtual environment inside the container, when your app is the only Python app in that container, no clash with any other one?

1

u/dogfish182 Jul 29 '18

We use our containers for a terraform pipeline which allows us to have the users run their builds locally to see the plan, for this we have aliased commands that call pipenv runxxxx and use a number of packaged tools.

The docker container then contains an exact replica of what the users will run and we use the same aliased commands (to keep things easy)

So replicating userland in a docker container makes sense, then we just ensure that deployment only occurs in the pipeline context.