Skip to content

Instantly share code, notes, and snippets.

@svirmi
Last active March 31, 2021 09:33
Show Gist options
  • Select an option

  • Save svirmi/b75ea32a5ba9aa9b7bce06a7bd6596eb to your computer and use it in GitHub Desktop.

Select an option

Save svirmi/b75ea32a5ba9aa9b7bce06a7bd6596eb to your computer and use it in GitHub Desktop.
Building a PHP Command Line App with Docker
docker run -it --rm -u $(id -u ${USER}):$(id -g ${USER}) -v ${PWD}:/app -w /app php:cli php /app/RedirectSEO.php
https://stackoverflow.com/questions/54182191/how-to-run-a-php-script-on-docker
https://www.cloudbees.com/blog/building-a-php-command-line-app-with-docker/
$ docker run --rm -v $(pwd):/app -w /app php:cli php artisan make:command UpdateNextItem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment