Skip to content

taiiiraaa/docker-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run a PHP application in a docker container

Includes linked containers for PHP, Nginx and Mysql.

Install

Docker

Directory

Go to the directory where this repository was cloned.

E.g:

$ cd /var/www/docker-php

Build Container

$ docker-compose build

Start Container

$ docker-compose up [-d]

-d to run in detached mode

Run bash in container

$ docker exec -it containername_php_1 /bin/bash

Run composer

$ cd app
$ php composer.phar update

Run phpunit

$ ./bin/phpunit [--debug]

HTTP access

http://localhost:8080/

Mysql access

127.0.0.1:32776
root:root

Packages

  • php:7.2-fpm. To change PHP version, update docker/php/Dockerfile.
  • nginx:stable. To change Nginx version, update docker/nginx/Dockerfile.
  • mysql:5.7. To change Mysql version, update docker-compose.yml

About

Docker container for a PHP application

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published