PHP Classes

How to Implement a PHP Docker Setup Using the Package PHP Development with Docker: Run Docker to setup a PHP development environment

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2025-06-29 (5 days ago) RSS 2.0 feedNot yet rated by the usersTotal: Not yet counted Not yet ranked
Version License PHP version Categories
php-development-with 1.0GNU General Publi...5PHP 5, Systems administration, Language, W..., C...
Description 

Author

This package can run Docker to set up a PHP development environment.

It provides Docker configuration files to set up a PHP development environment that can run on Windows.

The package contains instructions to:

- Start a server to run PHP, MySQL and PhpMyAdmin

- Stop the server

- Access PhpMyAdmin

- Access PHP scripts running on the Web server

- Change the Web server document root path

This document covers setting up a PHP development environment using docker on Windows 10.

Innovation Award
PHP Programming Innovation award nominee
June 2025
Nominee
Vote
Docker is a tool that allows to set up and containers of operating systems and programs that will run on those systems.

Docker can be setup to run a system with PHP and other programs necessary to run PHP Websites.

This package provides configuration files and instructions to PHP on Windows using Docker.

Manuel Lemos
Picture of Ali YILMAZ
  Performance   Level  
Name: Ali YILMAZ <contact>
Classes: 17 packages by
Country: Turkey Turkey
Age: ???
All time rank: 248842 in Turkey Turkey
Week rank: 195 Up8 in Turkey Turkey Up
Innovation award
Innovation award
Nominee: 9x

Instructions

Example

<?php
phpinfo
();


Details

What is Php development with Docker?

This document covers setting up a PHP development environment using docker on Windows 10.

What's in it?

  • Php 8.0 (APACHE)
  • MYSQL (PDO)

Install docker

Get Docker

Install WSL 2 Why?

wsl --install

Start the server

Open the command prompt in the directory where the dockerfile and docker-compose.yml files are located and start the server by running the following command.

docker-compose up -d

Stop the server

Open a command prompt in the directory where the dockerfile and docker-compose.yml files are located and stop the server by running the following command.

docker-compose down

Reaching the phpmyadmin panel

Address: 127.0.0.1:8081 // Line 28th in docker-compose.yml.
Server Name: mysql_server // Line 30th in docker-compose.yml.
Username: root 
Password: // No password

Accessing the HTDOCS directory

Address: 127.0.0.1:8080 // Line 5th in docker-compose.yml.

If you want to define the project directory in another position

For this, the 7th line in the docker-compose.yml file must be updated.If you pay attention to this line, there are two different ways separated by :. The first way is the directory of the directory you want to define, and the second is the directory of the Docker server.You should organize the first way.By default, the location of Docker files is defined.

.:/var/www/html

  Files folder image Files (5)  
File Role Description
Accessible without login Plain text file docker-compose.yml Data Auxiliary data
Accessible without login Plain text file dockerfile Data Auxiliary data
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads  
 100%
Total:0
This week:0