docker / docker/buildx

Watch mode / `build --watch`

Open
#1,330 3 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/cli kind/enhancement priority/p3
Dominant language
Go
Stars
4.5k
Forks
682
Avg merge
2d 14h
Merged PRs (30d)
29

Description

Since Buildkit knows exactly which files in the system are required for the build, a --watch mode, that would rebuild an image automatically in case one of the files depended by it changes would come very in handy when developing docker images locally, or especially when testing them.

When called with --watch, buildx would NOT exit upon creation of the image, but instead would wait until the user exits with Ctrl+C.

Additionally, a bake --watch would be even better.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the buildx command entry points for build --watch and the proposed bake --watch, then review how BuildKit reports files required for an image build. Define completion as rebuilding when a dependency changes, keeping the process running until Ctrl+C, and covering the behavior for both commands.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
build-system, cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.