DEV Community

Cover image for Muti-PHP Docker Environment
bskiefer
bskiefer

Posted on

5 2

Muti-PHP Docker Environment

I've been working on a small utility to handle multiple PHP versions for all of my projects.

https://github.com/phpdocdev/docdev

Features

  • CLI utility (docdev)
  • Pre-built PHP images (5.4, 5.6, 7.2, 7.4, 8.1)
  • Automatic SSL certificates (http and https)
    • docdev certs
  • Automatic host mapping (project1.loc)
    • docdev hosts
  • Shell into a container
    • docdev exec
  • One command to switch between PHP versions
    • docdev php --start 74
  • Testing utility
    • docdev test
  • DNS server: mapping folders to hostnames
  • MailHog
  • Self updating

Test

Help

Tested only on Mac, sorry everyone else :(

Top comments (0)

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay