@@ -255,6 +255,10 @@ func loadDevelopmentConfig(service types.ServiceConfig, project *types.Project)
255
255
}
256
256
257
257
func (s * composeService ) makeRebuildFn (ctx context.Context , project * types.Project ) func (services rebuildServices ) {
258
+ for i , service := range project .Services {
259
+ service .PullPolicy = types .PullPolicyBuild
260
+ project .Services [i ] = service
261
+ }
258
262
return func (services rebuildServices ) {
259
263
serviceNames := make ([]string , 0 , len (services ))
260
264
allPaths := make (utils.Set [string ])
@@ -271,20 +275,7 @@ func (s *composeService) makeRebuildFn(ctx context.Context, project *types.Proje
271
275
strings .Join (serviceNames , ", " ),
272
276
strings .Join (append ([]string {"" }, allPaths .Elements ()... ), "\n - " ),
273
277
)
274
- imageIds , err := s .build (ctx , project , api.BuildOptions {
275
- Services : serviceNames ,
276
- })
277
- if err != nil {
278
- fmt .Fprintf (s .stderr (), "Build failed\n " )
279
- }
280
- for i , service := range project .Services {
281
- if id , ok := imageIds [service .Name ]; ok {
282
- service .Image = id
283
- }
284
- project .Services [i ] = service
285
- }
286
-
287
- err = s .Up (ctx , project , api.UpOptions {
278
+ err := s .Up (ctx , project , api.UpOptions {
288
279
Create : api.CreateOptions {
289
280
Services : serviceNames ,
290
281
Inherit : true ,
0 commit comments