Skip to content

Commit 1f89d6b

Browse files
authored
[CI]: Slim debian bookworm image python dockerfile (#4570)
<!-- Thanks for sending a pull request! Here are some tips for you: --> #### What type of PR is this? Fix #### What this PR does / why we need it Reduce the size for python tests so disk is not an issue in CI Signed-off-by: Nikola Jokic <jokicnikola07@gmail.com>
1 parent 02c5ff7 commit 1f89d6b

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

build/airflow-operator/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ARG PLATFORM=x86_64
2-
ARG BASE_IMAGE=python:3.10-bookworm
2+
ARG BASE_IMAGE=python:3.10-slim-bookworm
33
FROM --platform=$PLATFORM ${BASE_IMAGE}
44

55
RUN mkdir /proto

build/python-client/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
ARG PLATFORM=x86_64
2-
ARG BASE_IMAGE=python:3.9-bookworm
2+
ARG BASE_IMAGE=python:3.9-slim-bookworm
33
FROM --platform=$PLATFORM ${BASE_IMAGE}
44

55
RUN mkdir /proto
66

7+
# Install dependencies for the python client including test extras
78
COPY client/python/pyproject.toml /code/pyproject.toml
89

9-
RUN pip install "/code[test]"
10+
RUN pip install --no-cache-dir "/code[test]"
1011

11-
# Creating folders, and files for a project:
12+
# Copy the full client sources after deps are installed for better layer reuse
1213
COPY client/python /code
1314

1415
ENTRYPOINT ["/bin/bash"]

0 commit comments

Comments
 (0)