-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Open
Labels
area/buildRelates to Dockerfiles or docker build commandRelates to Dockerfiles or docker build command
Description
Is this a docs issue?
- My issue is about the documentation content or website
Type of issue
Information is incorrect
Description
The example shows the following: https://docs.docker.com/build/bake/reference/#targetno-cache
[target.no-cache](https://docs.docker.com/build/bake/reference/#targetno-cache)
Don't use cache when building the image. This is the same as the --no-cache flag for docker build.
target "default" {
no-cache = 1
}
And if I hover the "no-cache" string in visual studio code it says: no-cache optional, number

But the 1 has a red underline. If I hover that, I get:
Unsuitable value type (Unsuitable value: bool required)Docker DX (docker-language-server)

Location
https://docs.docker.com/build/bake/reference/
Suggestion
[target.no-cache](https://docs.docker.com/build/bake/reference/#targetno-cache)
Don't use cache when building the image. This is the same as the --no-cache flag for docker build.
target "default" {
no-cache = true
}
It seems like there is a clash with the Visual code extension Docker DX (docker-language-server)
more info
$ docker buildx bake ansible
[+] Building 0.0s (1/1) FINISHED docker-container:docker-container
=> [internal] load local bake definitions 0.0s
=> => reading docker-compose.yml 721B / 721B 0.0s
=> => reading docker-bake.hcl 2.15kB / 2.15kB 0.0s
docker-bake.hcl:89
--------------------
87 |
88 | target "ansible" {
89 | >>> no-cache = 1
90 | target = "ansible"
91 | output = [{type="cacheonly"}]
--------------------
ERROR: docker-bake.hcl:89,14-15: Unsuitable value type; Unsuitable value: bool required
If I use "true" instead of "1", then it works just fine. I also think "true" makes more sense than "1".
Metadata
Metadata
Assignees
Labels
area/buildRelates to Dockerfiles or docker build commandRelates to Dockerfiles or docker build command