How to set PHP Path to Docker container

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.

Recommended from Medium

Deploy your first Flask+MongoDB app on Kubernetes

Overview of Speech Recognition APIs for Android Platform*

ProphetStor Joins Datadog Marketplace to Deliver AI-based Optimization and Automation for Cloud…

[Part 1] Why No-Code Will Make Us All Software Developers

Add web support to your Flutter mobile app

Desk with a Macbook and an iMac

How to Keep Your App Dependencies Up-To-Date?

How to set up Azure App Configuration and Key Vault in a .Net Core project

Favro for Consulting Firms

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

How to get mac address of client machine in PHP

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

How To Use PHP (Part 2)

Your Road To Symfony 6 Certification