Last active
April 1, 2025 02:32
-
-
Save washopilot/e7d8e6afab182683903001e54f454ec6 to your computer and use it in GitHub Desktop.
Docker command for running PHP 8.4 with Laravel installer globally installed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --rm -it \ | |
-v "$(pwd):/workspace" \ | |
-w /workspace \ | |
php:8.4-cli-bookworm bash -c "apt update && apt install -y sudo curl unzip && groupadd -g $(id -g) devgroup && useradd -m -u $(id -u) -g $(id -g) dev && echo 'dev ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && sudo -u dev bash -c 'curl -sS https://getcomposer.org/installer | php && sudo mv composer.phar /usr/local/bin/composer && exec bash'" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --rm -it \ | |
-v "$(pwd):/workspace" \ | |
-w /workspace \ | |
php:8.4-cli-bookworm bash -c "apt update && apt install -y sudo curl unzip && groupadd -g $(id -g) devgroup && useradd -m -u $(id -u) -g $(id -g) dev && echo 'dev ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && sudo -u dev bash -c 'curl -sS https://getcomposer.org/installer | php && sudo mv composer.phar /usr/local/bin/composer && composer global require laravel/installer && echo \"export PATH=\\\$HOME/.composer/vendor/bin:\\\$PATH\" >> ~/.bashrc && exec bash'" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
composer create-project --prefer-dist laravel/laravel:^X.0 project-name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment