prepare volume for service set by `run`

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof 2021-08-30 09:35:01 +02:00
parent 3f50c5eff8
commit 78faf0dc51
No known key found for this signature in database
GPG Key ID: 9858809D6F8F6E7E
1 changed files with 3 additions and 0 deletions

View File

@ -146,6 +146,9 @@ func (s *composeService) prepareRun(ctx context.Context, project *types.Project,
}
service.Labels = service.Labels.Add(api.SlugLabel, slug)
service.Labels = service.Labels.Add(api.OneoffLabel, "True")
if err := prepareVolumes(project); err != nil { // all dependencies already checked, but might miss service img
return "", err
}
if err := s.ensureImagesExists(ctx, project, false); err != nil { // all dependencies already checked, but might miss service img
return "", err