You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the Dockerfile downloads and installs the python packages every time during the image build process. These packages can be cached to save some time (15-ish seconds) when rebuilding the image. This is mostly useful during development and can (depending on the config) speed up deployments.
This can be accomplished by installing the python dependencies first before copying the rest of the project. Such as this:
FROM python:latest
WORKDIR /usr/src/app
COPY requirements.txt Makefile ./
RUN make install-python-requirements
COPY . .
RUN make generate-site
EXPOSE 8000
ENTRYPOINT ["make", "serve"]
More information on this concept can be found through these resources:
Currently the
Dockerfile
downloads and installs the python packages every time during the image build process. These packages can be cached to save some time (15-ish seconds) when rebuilding the image. This is mostly useful during development and can (depending on the config) speed up deployments.This can be accomplished by installing the python dependencies first before copying the rest of the project. Such as this:
More information on this concept can be found through these resources:
The text was updated successfully, but these errors were encountered: