How to use Docker, PHP, and Laravel

Photo by Joshua Aragon on Unsplash
docker run — name my-own-mysql -e MYSQL_ROOT_PASSWORD=mypass123 -d mysql:8.0.1
docker run — name my-own-phpmyadmin -d — link my-own-mysql:db -p 8081:80 phpmyadmin/phpmyadmin
composer create-project laravel/laravel module_8
‘mysql’ => [    ‘driver’ => ‘mysql’,    ‘port’ => env(‘DB_PORT’, ‘3306’),    ‘host’ => $host,    ‘database’ => $database,    ‘username’ => $username,    ‘password’ => $password,    ‘charset’ => ‘utf8’,    ‘collation’ => ‘utf8_unicode_ci’,    ‘prefix’ => ‘’,    ‘strict’ => false,    ‘engine’ => null,    ‘options’ => extension_loaded(‘pdo_mysql’) ? array_filter([    PDO::MYSQL_ATTR_SSL_CA => env(‘MYSQL_ATTR_SSL_CA’),    ]) : [],],
php artisan serve --port=8082

--

--

--

I like building technology. That’s pretty much what I live for. http://www.evan-gertis.com/

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

Recommended from Medium

GitHub Action best practics

Statistical Overview of Linear Regression (Examples in Python)

Install Flutter SDK on windows without Android Studio(2021)

AWS EKS and Cluster-Autoscaler Gotchas

TEN X CertiK

Reading and Writing Files in Python.

Copy While Organizing Files Over Existing SSH Connections

Building a multi-file static logger with PHP

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
Evan Gertis

Evan Gertis

I like building technology. That’s pretty much what I live for. http://www.evan-gertis.com/

More from Medium

Build Simple REST API with Laravel

10 Resources to Learn Web Development with PHP

What’s new in Laravel? November edition.

Tidy up your Form Requests in Laravel