@@ -9,34 +9,32 @@ class DockerExecutorPhpServiceProvider extends ServiceProvider
99{
1010 use PluginServiceProviderTrait;
1111
12- const version = '0 .0.1 ' ; // Required for PluginServiceProviderTrait
12+ const version = '1 .0.0 ' ; // Required for PluginServiceProviderTrait
1313
1414 public function register ()
1515 {
1616 }
1717
1818 public function boot ()
1919 {
20- $ image = env ('SCRIPTS_PHP_IMAGE ' , 'processmaker4/executor-php ' );
21- $ dockerDir = sys_get_temp_dir () . "/pm4-docker-builds/php " ;
22- $ sdkDir = $ dockerDir . "/sdk " ;
20+ // Note: `processmaker4/executor-php` is now the base image that the instance inherits from
21+ $ image = env ('SCRIPTS_PHP_IMAGE ' , 'processmaker4/executor-instance-php:v1.0.0 ' );
2322
2423 \Artisan::command ('docker-executor-php:install ' , function () {
2524 // Restart the workers so they know about the new supported language
2625 \Artisan::call ('horizon:terminate ' );
27- });
2826
29- \Artisan:: command ( ' docker- executor-php:build-base ' , function () {
30- system ("docker build -t processmaker4/base -php:latest " . __DIR__ . '/.. ' );
27+ // Build the base image that ` executor-instance-php` inherits from
28+ system ("docker build -t processmaker4/executor -php:latest " . __DIR__ . '/.. ' );
3129 });
32-
30+
3331 $ config = [
3432 'name ' => 'PHP ' ,
3533 'runner ' => 'PhpRunner ' ,
3634 'mime_type ' => 'application/x-php ' ,
3735 'image ' => $ image ,
3836 'options ' => ['invokerPackage ' => "ProcessMaker \\Client " ],
39- 'init_dockerfile ' => "FROM processmaker4/base -php:latest \n COPY ./sdk /opt/pm4-sdk \n RUN composer config repositories.pm4-sdk path /opt/pm4-sdk \n RUN composer require ProcessMaker/sdk-php:@dev " ,
37+ 'init_dockerfile ' => "FROM processmaker4/executor -php:latest \n ARG SDK_DIR \n " ,
4038 ];
4139 config (['script-runners.php ' => $ config ]);
4240
0 commit comments