Skip to content

Commit a7dd54c

Browse files
committed
Update to composer usage from docker image
Signed-off-by: Riddhesh Sanghvi <riddheshsanghvi96@gmail.com>
1 parent f862f55 commit a7dd54c

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

src/Admin_Tools_Command.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -244,14 +244,10 @@ private function move_config_file( $template_file, $config_file ) {
244244
*/
245245
private function composer_install( $tool_path ) {
246246

247-
putenv( 'COMPOSER_HOME=' . EE_VENDOR_DIR . '/bin/composer' );
248-
putenv( 'COMPOSER_CACHE_DIR=/dev/null' );
249-
putenv( 'COMPOSER_ALLOW_SUPERUSER=1' );
250247
chdir( $tool_path );
251-
$input = new ArrayInput( array( 'command' => 'update' ) );
252-
$application = new Application();
253-
$application->setAutoExit( false );
254-
$application->run( $input );
248+
EE::log( 'Installing dependencies. This may take a little while.' );
249+
$img_versions = \EE\Utils\get_image_versions();
250+
EE::exec( sprintf( 'docker run --rm -it -e USER_ID=0 -e GROUP_ID=0 --user=root -v $PWD:/var/www/htdocs easyengine/php:%s composer update', $img_versions['easyengine/php'] ) );
255251
}
256252

257253
/**

0 commit comments

Comments
 (0)