Signed-off-by: Nicolas De Loof <[email protected]>
@@ -470,6 +470,7 @@ func (s *composeService) startService(ctx context.Context, project *types.Projec
Filters: filters.NewArgs(
projectFilter(project.Name),
serviceFilter(service.Name),
+ oneOffFilter(false),
),
All: true,
})
@@ -50,6 +50,10 @@ func (s *composeService) RunOneOffContainer(ctx context.Context, project *types.
}
service.Scale = 1
service.StdinOpen = true
+ service.Restart = ""
+ if service.Deploy != nil {
+ service.Deploy.RestartPolicy = nil
+ }
service.Labels = service.Labels.Add(api.SlugLabel, slug)
service.Labels = service.Labels.Add(api.OneoffLabel, "True")