Como definir o caminho do PHP para um container do Docker

docker run -itd --restart always --name php-path php:7.4
sudo nano /usr/local/bin/php
#!/bin/bash
docker exec -i --user=1000:1000 php-path php "$@"
sudo chmod +x /usr/local/bin/php
php -v

--

--

--

Full Stack Web Developer

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Luis Coutinho

Luis Coutinho

Full Stack Web Developer

More from Medium

Your Road To Symfony 6 Certification

How To Enable PHP Debugging with XDebug and Visual Studio Code (Ubuntu)

Symfony Station Communiqué — 18 March 2022. A look at Symfony and PHP news!

Code logo

Laravel: Use Increment IDs , UUIDs, ULIDs as primary key or optional field for the Eloquent model