Skip to content

Commit 4a0872b

Browse files
Clean up cache files to reduce Docker image size
Remove unnecessary cache files and temporary data: - Remove apt lists after package installation - Use pip --no-cache-dir flag Image size comparison: ``` REPOSITORY TAG IMAGE ID CREATED SIZE scrapegraph-ai after 609a2ecf4678 20 minutes ago 3.1GB scrapegraph-ai before e3093b782ab0 24 minutes ago 3.39GB ``` This reduced about 0.29GB image size by preventing cache files from being included in the final image layers.
1 parent 5a100fb commit 4a0872b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
FROM python:3.11-slim
22

3-
RUN apt-get update && apt-get upgrade -y
3+
RUN apt-get update && apt-get upgrade -y && rm -rf /var/lib/apt/lists/*
44

5-
RUN pip install scrapegraphai
6-
RUN pip install scrapegraphai[burr]
5+
RUN pip install --no-cache-dir scrapegraphai
6+
RUN pip install --no-cache-dir scrapegraphai[burr]
77

88
RUN python3 -m playwright install-deps
99
RUN python3 -m playwright install

0 commit comments

Comments
 (0)