LoginSignup
4

More than 1 year has passed since last update.

多分一番簡単なDockerでのPHP環境構築

Posted at

ちょろっといじりたいときとか下記コマンドでPHPの環境が構築できる
下記コマンドを実行

mkdir workspace
cd workspace
docker run -p 8080:80 -v path-to-workspace/www:/var/www/html --name php80 -d php:8.0-apache
docker exec -ti php80 bash
touch index.php
echo '<?php phpinfo();' > index.php

下記にアクセス
http://localhost:8080

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4