Skip to content

Commit

Permalink
Prevent pip cache in Docker image to save image size
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterDaveHello committed Apr 23, 2021
1 parent 96c1272 commit ff0e260
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ RUN mkdir /src
WORKDIR /src

COPY requirements.txt /src/requirements.txt
RUN pip install -r requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

COPY test-requirements.txt /src/test-requirements.txt
RUN pip install -r test-requirements.txt
RUN pip install --no-cache-dir -r test-requirements.txt

COPY . /src
RUN pip install .
RUN pip install --no-cache-dir .
2 changes: 1 addition & 1 deletion Dockerfile-docs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ RUN addgroup --gid $gid sphinx \

WORKDIR /src
COPY requirements.txt docs-requirements.txt ./
RUN pip install -r requirements.txt -r docs-requirements.txt
RUN pip install --no-cache-dir -r requirements.txt -r docs-requirements.txt

USER sphinx

0 comments on commit ff0e260

Please sign in to comment.