From ea3e364c50a25ccc1de4fbecd164fffede317ce4 Mon Sep 17 00:00:00 2001 From: Mathieu Grzybek Date: Thu, 7 May 2026 11:26:39 +0200 Subject: [PATCH 1/3] chores(docker): add .dockerignore files for better build time and lighter images Signed-off-by: Mathieu Grzybek --- client/.dockerignore | 14 ++++++++++++++ operator/.dockerignore | 14 ++++++++++++++ registrar/.dockerignore | 13 +++++++++++++ sshd/.dockerignore | 13 +++++++++++++ sync/.dockerignore | 14 ++++++++++++++ 5 files changed, 68 insertions(+) create mode 100644 client/.dockerignore create mode 100644 operator/.dockerignore create mode 100644 registrar/.dockerignore create mode 100644 sshd/.dockerignore create mode 100644 sync/.dockerignore diff --git a/client/.dockerignore b/client/.dockerignore new file mode 100644 index 00000000..527784f7 --- /dev/null +++ b/client/.dockerignore @@ -0,0 +1,14 @@ +# Exclude the dockerfile itself +Dockerfile + +# Exclude Python caches and build artifacts +**/__pycache__ +**/*.pyc +*.egg-info + +# Exclude dev/test files not needed for the build +.dockerignore +.gitignore +shell.nix +test-requirements.txt +tox.ini diff --git a/operator/.dockerignore b/operator/.dockerignore new file mode 100644 index 00000000..b88790f9 --- /dev/null +++ b/operator/.dockerignore @@ -0,0 +1,14 @@ +# Exclude the dockerfile itself +Dockerfile + +# Exclude Python caches and build artifacts +**/__pycache__ +**/*.pyc +*.egg-info + +# Exclude dev/test files not needed for the build +.dockerignore +.gitignore +example.yaml +test-requirements.txt +tox.ini diff --git a/registrar/.dockerignore b/registrar/.dockerignore new file mode 100644 index 00000000..568b5ac5 --- /dev/null +++ b/registrar/.dockerignore @@ -0,0 +1,13 @@ +# Exclude the dockerfile itself +Dockerfile + +# Exclude Python caches and build artifacts +**/__pycache__ +**/*.pyc +*.egg-info + +# Exclude dev/test files not needed for the build +.dockerignore +.gitignore +test-requirements.txt +tox.ini diff --git a/sshd/.dockerignore b/sshd/.dockerignore new file mode 100644 index 00000000..568b5ac5 --- /dev/null +++ b/sshd/.dockerignore @@ -0,0 +1,13 @@ +# Exclude the dockerfile itself +Dockerfile + +# Exclude Python caches and build artifacts +**/__pycache__ +**/*.pyc +*.egg-info + +# Exclude dev/test files not needed for the build +.dockerignore +.gitignore +test-requirements.txt +tox.ini diff --git a/sync/.dockerignore b/sync/.dockerignore new file mode 100644 index 00000000..b6ee364d --- /dev/null +++ b/sync/.dockerignore @@ -0,0 +1,14 @@ +# Exclude the dockerfile itself +Dockerfile + +# Exclude Python caches and build artifacts +**/__pycache__ +**/*.pyc +*.egg-info + +# Exclude dev/test files not needed for the build +# Note: chart/ is intentionally included — it is COPYed into the helm build stage +.dockerignore +.gitignore +test-requirements.txt +tox.ini From d9a87ff394264ff40bc6dd43ab31803239572b7b Mon Sep 17 00:00:00 2001 From: Mathieu Grzybek Date: Thu, 7 May 2026 11:51:42 +0200 Subject: [PATCH 2/3] chores(docker): add apt options --no-install-{recommandes,suggests} Signed-off-by: Mathieu Grzybek --- client/Dockerfile | 2 +- operator/Dockerfile | 2 +- proxy/Dockerfile | 2 +- registrar/Dockerfile | 2 +- sshd/Dockerfile | 2 +- sync/Dockerfile | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/client/Dockerfile b/client/Dockerfile index 160a5746..f97eb779 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:24.04 AS python-builder RUN apt-get update && \ - apt-get install -y python3 python3-venv && \ + apt-get install --no-install-recommends --no-install-suggests -y python3 python3-venv && \ rm -rf /var/lib/apt/lists/* RUN python3 -m venv /venv && \ diff --git a/operator/Dockerfile b/operator/Dockerfile index 0877a809..1f21e4ef 100644 --- a/operator/Dockerfile +++ b/operator/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:24.04 AS python-builder RUN apt-get update && \ - apt-get install -y python3 python3-venv && \ + apt-get install --no-install-recommends --no-install-suggests -y python3 python3-venv && \ rm -rf /var/lib/apt/lists/* RUN python3 -m venv /venv && \ diff --git a/proxy/Dockerfile b/proxy/Dockerfile index 5f8fc80c..8986d1c1 100644 --- a/proxy/Dockerfile +++ b/proxy/Dockerfile @@ -12,7 +12,7 @@ FROM ubuntu:24.04 AS nginx-gpg-key ENV NGINX_GPG_KEY="2FD21310B49F6B46" RUN apt-get update && \ - apt-get install -y gnupg2 && \ + apt-get install --no-install-recommends --no-install-suggests -y gnupg2 && \ rm -rf /var/lib/apt/lists/* RUN gpg2 --keyserver hkp://keyserver.ubuntu.com:80 --keyserver-options timeout=10 --recv-keys "$NGINX_GPG_KEY" && \ diff --git a/registrar/Dockerfile b/registrar/Dockerfile index fbe6d366..2a6b8391 100644 --- a/registrar/Dockerfile +++ b/registrar/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:24.04 AS python-builder RUN apt-get update && \ - apt-get install -y python3 python3-venv && \ + apt-get install --no-install-recommends --no-install-suggests -y python3 python3-venv && \ rm -rf /var/lib/apt/lists/* RUN python3 -m venv /venv && \ diff --git a/sshd/Dockerfile b/sshd/Dockerfile index 67a7ec5f..26ad86eb 100644 --- a/sshd/Dockerfile +++ b/sshd/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:24.04 AS python-builder RUN apt-get update && \ - apt-get install -y python3 python3-venv && \ + apt-get install --no-install-recommends --no-install-suggests -y python3 python3-venv && \ rm -rf /var/lib/apt/lists/* RUN python3 -m venv /venv && \ diff --git a/sync/Dockerfile b/sync/Dockerfile index 54c700e9..5b491ae1 100644 --- a/sync/Dockerfile +++ b/sync/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:24.04 as helm RUN apt-get update && \ - apt-get install -y wget && \ + apt-get install --no-install-recommends --no-install-suggests -y wget && \ rm -rf /var/lib/apt/lists/* # Install yq from the official Docker image @@ -41,7 +41,7 @@ RUN set -e; \ FROM ubuntu:24.04 AS python-builder RUN apt-get update && \ - apt-get install -y python3 python3-venv && \ + apt-get install --no-install-recommends --no-install-suggests -y python3 python3-venv && \ rm -rf /var/lib/apt/lists/* RUN python3 -m venv /venv && \ From 8b396dcf8ffa3622075d6250cdcdb3639c816ef0 Mon Sep 17 00:00:00 2001 From: Mathieu Grzybek Date: Thu, 7 May 2026 14:22:14 +0200 Subject: [PATCH 3/3] Update Dockerfile `wget` needs `ca-certificates` --- sync/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sync/Dockerfile b/sync/Dockerfile index 5b491ae1..6a1fd2d4 100644 --- a/sync/Dockerfile +++ b/sync/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:24.04 as helm RUN apt-get update && \ - apt-get install --no-install-recommends --no-install-suggests -y wget && \ + apt-get install --no-install-recommends --no-install-suggests -y ca-certificates wget && \ rm -rf /var/lib/apt/lists/* # Install yq from the official Docker image