1
0
Fork 0
mirror of synced 2024-05-21 05:02:37 +12:00

Switched to alpine images

This commit is contained in:
Eldad Fux 2020-07-15 16:34:28 +03:00
parent b70e185450
commit abb7c04994
2 changed files with 30 additions and 26 deletions

View file

@ -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',
],
];

View file

@ -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;