File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -704,7 +704,7 @@ type Target struct {
704704 Outputs []string `json:"output,omitempty" hcl:"output,optional" cty:"output"`
705705 Pull * bool `json:"pull,omitempty" hcl:"pull,optional" cty:"pull"`
706706 NoCache * bool `json:"no-cache,omitempty" hcl:"no-cache,optional" cty:"no-cache"`
707- NetworkMode * string `json:"network" hcl:"network" cty:"network"`
707+ NetworkMode * string `json:"network,omitempty " hcl:"network,optional " cty:"network"`
708708 NoCacheFilter []string `json:"no-cache-filter,omitempty" hcl:"no-cache-filter,optional" cty:"no-cache-filter"`
709709 ShmSize * string `json:"shm-size,omitempty" hcl:"shm-size,optional"`
710710 Ulimits []string `json:"ulimits,omitempty" hcl:"ulimits,optional"`
Original file line number Diff line number Diff line change @@ -103,6 +103,26 @@ target "build" {
103103 require .Equal (t , "." , * def .Target ["build" ].Context )
104104 require .Equal (t , "Dockerfile" , * def .Target ["build" ].Dockerfile )
105105 require .Equal (t , map [string ]* string {"HELLO" : ptrstr ("foo" )}, def .Target ["build" ].Args )
106+
107+ require .Equal (t , `{
108+ "group": {
109+ "default": {
110+ "targets": [
111+ "build"
112+ ]
113+ }
114+ },
115+ "target": {
116+ "build": {
117+ "context": ".",
118+ "dockerfile": "Dockerfile",
119+ "args": {
120+ "HELLO": "foo"
121+ }
122+ }
123+ }
124+ }
125+ ` , stdout .String ())
106126}
107127
108128func testBakeLocal (t * testing.T , sb integration.Sandbox ) {
You can’t perform that action at this time.
0 commit comments