1👍
✅
I found a better alternative
export DOCKER_BUILDKIT=1
export COMPOSE_DOCKER_CLI_BUILD=1
put following line as the first line of Dockerfile .
# syntax=docker/dockerfile:experimental
I lost where I found this..
end result is that, your requirements package is cached (once downloaded, cached version will be used on next build)
2👍
You can divide by yourself in different files the requirements that are less likely to change and those that are most likely to change.
Then you have two different RUN
stages like
RUN pip install -r less_likely_to_change.txt
RUN pip install -r most_likely_to_change.txt
This will create a layer where you have most of your requirements, and therefore, you are speeding up the process because you won’t be changing less_likely_to_change.txt
so often.
- [Django]-How I can change render to return json in view Django
- [Django]-Checking whether two Django querysets have any items in common
- [Django]-Django-Haystack/Whoosh – Rebuild Index Error
- [Django]-Django : Migration of polymorphic models back to a single base class
Source:stackexchange.com