Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Suggest code actions if the Bake file references a build stage that does not exist

Open
#74 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
docker, go

Research direction

Start by tracing how a Bake target reference is resolved and how the referenced Dockerfile's stages can be scanned. Review the code-action behavior for replacing stage3 with stage or stage2, then assess the WorkspaceEdit UX for creating a FROM line in another file. Done means the supported suggestion behavior is defined and covered by tests.

Written by the indexing model from the issue text.

Description

bake
FROM scratch AS stage
FROM scratch AS stage2
target "default" {
  target = "stage3"
}

We should suggest:

  1. changing stage3 to stage or stage2 by scanning for all stages in the referenced Dockerfile
  2. creating a new FROM line that will be named stage3

1 is straightforward. 2 may be questionable as we'd need to introduce a WorkspaceEdit for another file. We should review what the UX will look like before necessarily committing to implementing 2.

Dominant language
Go
Stars
185
Forks
28
PR merge metrics
No merged PRs in 30d

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.

More from docker/docker-language-server

All issues in docker/docker-language-server

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.