mirror of
				https://gitea.com/Lydanne/buildx.git
				synced 2025-11-04 18:13:42 +08:00 
			
		
		
		
	add note about variable syntax in json
In addition to HCL, variables can also be defined in json. Signed-off-by: wojciechem <wmiedzybrodzki@outlook.com>
This commit is contained in:
		@@ -450,6 +450,28 @@ target "webapp" {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					alternatively, in json format:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```json
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  "variable": {
 | 
				
			||||||
 | 
					    "TAG": {
 | 
				
			||||||
 | 
					      "default": "latest"
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  "group": {
 | 
				
			||||||
 | 
					    "default": {
 | 
				
			||||||
 | 
					      "targets": ["webapp"]
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  "target": {
 | 
				
			||||||
 | 
					    "webapp": {
 | 
				
			||||||
 | 
					      "tags": ["docker.io/username/webapp:${TAG}"]
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```console
 | 
					```console
 | 
				
			||||||
$ docker buildx bake --print webapp
 | 
					$ docker buildx bake --print webapp
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user