diff --git a/pkg/compose/convergence.go b/pkg/compose/convergence.go index 5565ab0ef..03d7e4b35 100644 --- a/pkg/compose/convergence.go +++ b/pkg/compose/convergence.go @@ -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, }) diff --git a/pkg/compose/run.go b/pkg/compose/run.go index 7ecde9e58..947e38b57 100644 --- a/pkg/compose/run.go +++ b/pkg/compose/run.go @@ -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")