@@ -963,6 +963,11 @@ Please use the built-in docker-compose.
963
963
Fix with 'ddev config global --required-docker-compose-version="" --use-docker-compose-from-path=false': %v` , err )
964
964
}
965
965
966
+ err = app .PullBaseContainerImages ()
967
+ if err != nil {
968
+ util .Warning ("Unable to pull docker images: %v" , err )
969
+ }
970
+
966
971
if ! nodeps .ArrayContainsString (app .GetOmittedContainers (), "db" ) {
967
972
// OK to start if dbType is empty (nonexistent) or if it matches
968
973
if dbType , err := app .GetExistingDBType (); err != nil || (dbType != "" && dbType != app .Database .Type + ":" + app .Database .Version ) {
@@ -1051,11 +1056,6 @@ Fix with 'ddev config global --required-docker-compose-version="" --use-docker-c
1051
1056
return err
1052
1057
}
1053
1058
1054
- err = app .PullBaseContainerImages ()
1055
- if err != nil {
1056
- util .Warning ("Unable to pull docker images: %v" , err )
1057
- }
1058
-
1059
1059
dockerutil .CheckAvailableSpace ()
1060
1060
1061
1061
// Copy any homeadditions content into .ddev/.homeadditions
@@ -1092,15 +1092,15 @@ Fix with 'ddev config global --required-docker-compose-version="" --use-docker-c
1092
1092
}
1093
1093
}
1094
1094
1095
- _ , out , err := dockerutil .RunSimpleContainer (versionconstants .GetWebImage (), "" , []string {"sh" , "-c" , fmt .Sprintf ("chown -R %s /var/lib/mysql /mnt/ddev-global-cache" , uid )}, []string {}, []string {}, []string {app .GetMariaDBVolumeName () + ":/var/lib/mysql" , "ddev-global-cache:/mnt/ddev-global-cache" }, "" , true , false , nil )
1095
+ _ , out , err := dockerutil .RunSimpleContainer (versionconstants .GetWebImage (), "start-chown-" + util . RandString ( 6 ) , []string {"sh" , "-c" , fmt .Sprintf ("chown -R %s /var/lib/mysql /mnt/ddev-global-cache" , uid )}, []string {}, []string {}, []string {app .GetMariaDBVolumeName () + ":/var/lib/mysql" , "ddev-global-cache:/mnt/ddev-global-cache" }, "" , true , false , map [ string ] string { "com.ddev.site-name" : app . Name } )
1096
1096
if err != nil {
1097
1097
return fmt .Errorf ("failed to RunSimpleContainer to chown volumes: %v, output=%s" , err , out )
1098
1098
}
1099
1099
1100
1100
// Chown the postgres volume; this shouldn't have to be a separate stanza, but the
1101
1101
// uid is 999 instead of current user
1102
1102
if app .Database .Type == nodeps .Postgres {
1103
- _ , out , err := dockerutil .RunSimpleContainer (versionconstants .GetWebImage (), "" , []string {"sh" , "-c" , fmt .Sprintf ("chown -R %s /var/lib/postgresql/data" , "999:999" )}, []string {}, []string {}, []string {app .GetPostgresVolumeName () + ":/var/lib/postgresql/data" }, "" , true , false , nil )
1103
+ _ , out , err := dockerutil .RunSimpleContainer (versionconstants .GetWebImage (), "start-postgres-chown-" + util . RandString ( 6 ) , []string {"sh" , "-c" , fmt .Sprintf ("chown -R %s /var/lib/postgresql/data" , "999:999" )}, []string {}, []string {}, []string {app .GetPostgresVolumeName () + ":/var/lib/postgresql/data" }, "" , true , false , map [ string ] string { "com.ddev.site-name" : app . Name } )
1104
1104
if err != nil {
1105
1105
return fmt .Errorf ("failed to RunSimpleContainer to chown postgres volume: %v, output=%s" , err , out )
1106
1106
}
0 commit comments