TEST-INFRA: [ci-execution-time] Optimize Docker image builds with layer caching #7206

Open
opened 2026-04-10 08:55:01 +00:00 by HAL9000 · 3 comments
Owner

Summary

The docker job in .forgejo/workflows/ci.yml builds two Docker images on every run. Currently, these builds do not leverage Docker layer caching, which means that the images are built from scratch every time. This is inefficient and can significantly slow down the CI pipeline, especially as the Docker images grow in size and complexity.

Metadata

Backlog note: This issue was discovered during autonomous operation
on milestone v3.8.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.

Subtasks

  • Investigate and implement a Docker layer caching strategy in the docker job. This can likely be achieved using actions/cache with a carefully crafted key that invalidates the cache only when the Dockerfile or related files change.
  • Verify that the layer caching is working as expected and that the Docker build times are reduced.

Definition of Done

  • The docker job uses layer caching to speed up image builds.
  • The time taken to build the Docker images is significantly reduced on subsequent runs when the Dockerfile and related files have not changed.
  • The CI pipeline continues to produce valid and functional Docker images.
  • All CI checks continue to pass as expected.
  • All nox stages pass.
  • Coverage >= 97%

Duplicate Check

  • Search queries: "docker cache", "layer caching", "docker build optimization"
  • Results: 0
  • Justification: No existing issues address the optimization of Docker image builds in the CI pipeline.

Automated by CleverAgents Bot
Supervisor: Test Infrastructure | Agent: new-issue-creator

## Summary The `docker` job in `.forgejo/workflows/ci.yml` builds two Docker images on every run. Currently, these builds do not leverage Docker layer caching, which means that the images are built from scratch every time. This is inefficient and can significantly slow down the CI pipeline, especially as the Docker images grow in size and complexity. ## Metadata - **Branch**: `task/ci-execution-time-optimize-docker-layer-caching` - **Commit Message**: `chore(ci): optimize Docker image builds with layer caching` - **Milestone**: N/A — Backlog (see note below) - **Parent Epic**: #1678 > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.8.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. ## Subtasks - [ ] Investigate and implement a Docker layer caching strategy in the `docker` job. This can likely be achieved using `actions/cache` with a carefully crafted key that invalidates the cache only when the `Dockerfile` or related files change. - [ ] Verify that the layer caching is working as expected and that the Docker build times are reduced. ## Definition of Done - [ ] The `docker` job uses layer caching to speed up image builds. - [ ] The time taken to build the Docker images is significantly reduced on subsequent runs when the Dockerfile and related files have not changed. - [ ] The CI pipeline continues to produce valid and functional Docker images. - [ ] All CI checks continue to pass as expected. - [ ] All nox stages pass. - [ ] Coverage >= 97% ### Duplicate Check - Search queries: "docker cache", "layer caching", "docker build optimization" - Results: 0 - Justification: No existing issues address the optimization of Docker image builds in the CI pipeline. --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: new-issue-creator
HAL9000 added the
Priority
Backlog
State
Unverified
Type
Task
labels 2026-04-10 09:00:30 +00:00
HAL9000 added
State
Verified
Priority
Low
MoSCoW
Could have
and removed
State
Unverified
Priority
Backlog
labels 2026-04-14 06:23:44 +00:00
Author
Owner

Verified — CI optimization: Docker image layer caching. MoSCoW: Could-have. Priority: Low.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner-pool-supervisor

✅ **Verified** — CI optimization: Docker image layer caching. MoSCoW: Could-have. Priority: Low. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
Author
Owner

Verified — CI optimization: Docker image layer caching. MoSCoW: Could-have. Priority: Low.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner-pool-supervisor

✅ **Verified** — CI optimization: Docker image layer caching. MoSCoW: Could-have. Priority: Low. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
Author
Owner

Verified — CI optimization: Docker image layer caching. MoSCoW: Could-have. Priority: Low.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner-pool-supervisor

✅ **Verified** — CI optimization: Docker image layer caching. MoSCoW: Could-have. Priority: Low. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: cleveragents/cleveragents-core#7206