[docker/not in docker] setup php+composer+laravel environment in a ubuntu container in 1 command

docker


apt update && apt install php ca-certificates git zip unzip php-zip curl php-curl php-xml wget -y && cd /tmp && wget https://getcomposer.org/installer -O composer-setup.php --no-check-certificate && wget https://composer.github.io/installer.sig --no-check-certificate && HASH=`cat installer.sig` && php -r "if (hash_file('SHA384', '/tmp/composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer



not in docker


sudo apt update && sudo apt install php ca-certificates git zip unzip php-zip curl php-curl php-xml wget -y && cd /tmp && wget https://getcomposer.org/installer -O composer-setup.php --no-check-certificate && wget https://composer.github.io/installer.sig --no-check-certificate && HASH=`cat installer.sig` && php -r "if (hash_file('SHA384', '/tmp/composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && sudo php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer

留言

此網誌的熱門文章

Making a Windows 11 hotspot without an internet connection