Switched to alpine images
This commit is contained in:
parent
b70e185450
commit
abb7c04994
|
@ -3,32 +3,32 @@
|
|||
return [
|
||||
'node-14' => [
|
||||
'name' => 'Node.js',
|
||||
'version' => '14.0',
|
||||
'image' => 'node:14',
|
||||
'version' => '14.5',
|
||||
'image' => 'node:14.5-alpine',
|
||||
'logo' => 'node.png',
|
||||
],
|
||||
'php-7.4' => [
|
||||
'name' => 'PHP',
|
||||
'version' => '7.4',
|
||||
'image' => 'php:7.4-cli',
|
||||
'image' => 'php:7.4-cli-alpine',
|
||||
'logo' => 'php.png',
|
||||
],
|
||||
'ruby-2.7' => [
|
||||
'name' => 'Ruby',
|
||||
'version' => '2.7',
|
||||
'image' => 'ruby:2.7',
|
||||
'image' => 'ruby:2.7-alpine',
|
||||
'logo' => 'ruby.png',
|
||||
],
|
||||
'dart-2.8' => [
|
||||
'name' => 'Dart',
|
||||
'version' => '2.8',
|
||||
'image' => 'google/dart:2.8',
|
||||
'logo' => 'dart.png',
|
||||
],
|
||||
// 'dart-2.8' => [
|
||||
// 'name' => 'Dart',
|
||||
// 'version' => '2.8',
|
||||
// 'image' => 'google/dart:2.8',
|
||||
// 'logo' => 'dart.png',
|
||||
// ],
|
||||
'python-3.8' => [
|
||||
'name' => 'Python',
|
||||
'version' => '3.8',
|
||||
'image' => 'python:3.8',
|
||||
'image' => 'python:3.8-alpine',
|
||||
'logo' => 'python.png',
|
||||
],
|
||||
];
|
|
@ -13,22 +13,26 @@ $environments = Config::getParam('environments');
|
|||
|
||||
$warmupStart = microtime(true);
|
||||
|
||||
foreach($environments as $environment) { // Warmup: make sure images are ready to run fast 🚀
|
||||
$stdout = '';
|
||||
$stderr = '';
|
||||
|
||||
Console::info('Warming up '.$environment['name'].' environment');
|
||||
|
||||
Console::execute('docker pull '.$environment['image'], null, $stdout, $stderr);
|
||||
|
||||
if(!empty($stdout)) {
|
||||
Console::log($stdout);
|
||||
Co\run(function() use ($environments) {
|
||||
foreach($environments as $environment) { // Warmup: make sure images are ready to run fast 🚀
|
||||
go(function() use ($environment) {
|
||||
$stdout = '';
|
||||
$stderr = '';
|
||||
|
||||
Console::info('Warming up '.$environment['name'].' environment');
|
||||
|
||||
Console::execute('docker pull '.$environment['image'], null, $stdout, $stderr);
|
||||
|
||||
if(!empty($stdout)) {
|
||||
Console::log($stdout);
|
||||
}
|
||||
|
||||
if(!empty($stderr)) {
|
||||
Console::error($stderr);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if(!empty($stderr)) {
|
||||
Console::error($stderr);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$warmupEnd = microtime(true);
|
||||
$warmupTime = $warmupEnd - $warmupStart;
|
||||
|
|
Loading…
Reference in a new issue