mirror of
https://github.com/docker/compose.git
synced 2025-07-23 05:34:36 +02:00
update project's volumes_from before retrieving service
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
1ae9b3cb5d
commit
81879c4f4b
@ -127,6 +127,9 @@ func (s *composeService) runInteractive(ctx context.Context, containerID string,
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *composeService) prepareRun(ctx context.Context, project *types.Project, opts api.RunOptions) (string, error) {
|
func (s *composeService) prepareRun(ctx context.Context, project *types.Project, opts api.RunOptions) (string, error) {
|
||||||
|
if err := prepareVolumes(project); err != nil { // all dependencies already checked, but might miss service img
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
service, err := project.GetService(opts.Service)
|
service, err := project.GetService(opts.Service)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
@ -146,9 +149,6 @@ func (s *composeService) prepareRun(ctx context.Context, project *types.Project,
|
|||||||
}
|
}
|
||||||
service.Labels = service.Labels.Add(api.SlugLabel, slug)
|
service.Labels = service.Labels.Add(api.SlugLabel, slug)
|
||||||
service.Labels = service.Labels.Add(api.OneoffLabel, "True")
|
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
|
if err := s.ensureImagesExists(ctx, project, false); err != nil { // all dependencies already checked, but might miss service img
|
||||||
return "", err
|
return "", err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user