@@ -110,49 +110,14 @@ func (cfg *Config) Handle(ctx context.Context, client gwclient.Client) (*gwclien
110110 Description : "Builds a container image for testing purposes only." ,
111111 })
112112
113- mux .Add ("testing/container/distroless" , func (ctx context.Context , client gwclient.Client ) (* gwclient.Result , error ) {
114- return frontend .BuildWithPlatform (ctx , client , func (ctx context.Context , client gwclient.Client , platform * ocispecs.Platform , spec * dalec.Spec , targetKey string ) (gwclient.Reference , * dalec.DockerImageSpec , error ) {
115- sOpt , err := frontend .SourceOptFromClient (ctx , client , platform )
116- if err != nil {
117- return nil , nil , err
118- }
113+ mux .Add ("container" , func (ctx context.Context , client gwclient.Client ) (* gwclient.Result , error ) {
114+ cfg := * cfg
115+ cfg .DefaultOutputImage = ""
119116
120- var opts []llb.ConstraintsOpt
121- opts = append (opts , dalec .ProgressGroup (spec .Name ))
122- opts = append (opts , dalec .Platform (platform ))
123-
124- worker := cfg .Worker (sOpt , opts ... )
125-
126- // TODO: Add back support for prebuilt packages.
127- pkgSt := cfg .BuildPkg (ctx , client , sOpt , spec , targetKey , opts ... )
128-
129- img , err := cfg .BuildImageConfig (ctx , sOpt , spec , platform , targetKey )
130- if err != nil {
131- return nil , nil , err
132- }
133-
134- input := BuildContainerInput {
135- Config : cfg ,
136- Client : client ,
137- Worker : worker ,
138- SOpt : sOpt ,
139- Spec : spec ,
140- Target : targetKey ,
141- DebSt : pkgSt ,
142- Opts : opts ,
143- }
144-
145- ctr := BuildDistrolessContainer (ctx , input )
146-
147- tests := cfg .RunTests (ctx , client , spec , sOpt , ctr , targetKey , opts ... )
148-
149- ref , err := getRef (ctx , client , ctr .With (tests ))
150-
151- return ref , img , err
152- })
117+ return linux .HandleContainer (& cfg )(ctx , client )
153118 }, & targets.Target {
154- Name : "testing/ container/distroless " ,
155- Description : "Builds a distroless container image for testing purposes only ." ,
119+ Name : "container" ,
120+ Description : "Builds a container image." ,
156121 })
157122
158123 mux .Add ("dsc" , cfg .HandleSourcePkg , & targets.Target {
0 commit comments