Dockerfile: Resolve deps using pipenv/Pipefile(.lock) #496
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Been experimenting with
pipenv
for reproducible Docker image builds and came-up with this approach for httpbin.It makes a couple of Docker cacheability improvements - mainly because
Pipfile
andPipfile.lock
are added on their own before deps are installed, so changes to the rest of the source-code won't cause a cache-miss and re-download of all the dependencies.I'm curious as to whether this is an intended use of
pipenv
... it seems to help solve the problems for installing as Applications (versus Libraries) with pinned versions for dependencies for a specific build.With reference to #493, with this change the built Docker image should contain
greenlet
version0.14.3
(the locked version), and not the latest0.14.4
which would be resolved bysetup.py
.Fixed #493.