Giter Site home page Giter Site logo

vagnercardosoweb / docker-php8 Goto Github PK

View Code? Open in Web Editor NEW
95.0 5.0 75.0 33 KB

Docker with php8.2+, apache, mysql, postgresql, phpmyadmin, redis, nginx and pgadmin

License: MIT License

Dockerfile 96.00% PHP 1.38% Shell 2.61%
docker docker-compose mysql postgresql apache php pgadmin4 php82

docker-php8's Introduction

Docker with PHP 8.3.4

This repository aims to facilitate the creation of a development environment with php 8.3.4

What's in the environment:

Prerequisites:

How to use:

  • Clone the repository
  • Enter the repository folder
  • Run the docker-compose up command
    • if you want to run in background mode, run the command docker-compose up -d
  • Access the address http://localhost:8080 to access phpmyadmin
    • user access
      • user: mysql
      • password: mysql
      • host: mysql
    • root access
      • user: root
      • password: root
      • host: mysql
  • Access the address http://localhost:8081 to access pgadmin
  • Access the address http://localhost to access the project

Persistent data:

  • mysql data: ./docker/mysql/dbdata
  • postgresql data: ./docker/postgresql/dbdata
  • redis data: ./docker/redis

PHP INI Config:

Local php.ini configuration is located in the ./docker/php/php.ini file.

[PHP]
log_errors=On
xmlrpc_errors=On
html_errors=On
display_errors=On
display_startup_errors=On
report_memleaks=On
error_reporting=E_ALL
file_uploads=On
max_execution_time=120
max_input_time=120
session.gc_maxlifetime=1440
post_max_size=50M
upload_max_filesize=45M
max_file_uploads=20
variables_order="EGPCS"
max_input_vars=10000
max_input_nesting_level=64
date.timezone=UTC
memory_limit=512M
expose_php=On

[opcache]
opcache.enable=true
opcache.enable_cli=true
opcache.jit=tracing

[intl]
intl.default_locale=en_utf8

[xdebug]
xdebug.client_host=host.docker.internal
xdebug.client_port=9003
xdebug.discover_client_host=0
xdebug.start_with_request=yes
xdebug.remote_handler=dbgp
xdebug.idekey=PHPSTORM
xdebug.mode=debug,develop
xdebug.cli_color=1

PHP Modules:

[PHP Modules]
  apcu
  bcmath
  Core
  ctype
  curl
  date
  dom
  exif
  fileinfo
  filter
  gd
  gmp
  hash
  iconv
  imap
  intl
  json
  libxml
  mbstring
  mongodb
  mysqli
  mysqlnd
  openssl
  pcntl
  pcre
  PDO
  pdo_mysql
  pdo_pgsql
  pdo_sqlite
  pgsql
  Phar
  posix
  random
  readline
  redis
  Reflection
  session
  SimpleXML
  soap
  sockets
  sodium
  SPL
  sqlite3
  ssh2
  standard
  sysvmsg
  sysvsem
  sysvshm
  tokenizer
  xdebug
  xml
  xmlreader
  xmlwriter
  xsl
  yaml
  Zend OPcache
  zip
  zlib

[Zend Modules]
  Xdebug
  Zend OPcache

Comments:

The project starts the services of nginx, php, mysql, postgresql, phpmyadmin, pgadmin and redis by default, if you want to use apache2, mariadb you need to comment the services that are being used and enable the services you want to use on the docker-compose.yml file.

License:

MIT

docker-php8's People

Contributors

vagnercardosoweb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

docker-php8's Issues

Make x-debug connect to external remote

Hello ,

Recently I tested the stack and it worked very well , but I had a problem when I'm trying to use x-debug . Also As a PHP developer I prefer that XDEBUG disabled by default and enable it when needing .

I prepared a PR for this proposition .

PHP not building

When I run docker-compose up -d I get the following error when building PHP:

STEP 8/16: COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
Error: COPY --from=composer:latest: no stage or image found with that name

docker.apache keeps on resetarting state

Hello @vagnercardosoweb,

Noticed that "docker.apache" container keeps on restarting state. Any advise on how to resolve this? See below:

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ef3cfb55d3ed docker-php8-apache "httpd-foreground" 11 days ago Restarting (1) 1 second ago docker.apache
970e42fc557f phpmyadmin "/docker-entrypoint.…" 11 days ago Up 11 days 0.0.0.0:8080->80/tcp, :::8080->80/tcp docker.phpmyadmin
1a6dc995af28 docker-php8-php "docker-php-entrypoi…" 11 days ago Up 11 days 9000/tcp docker.php
b2c048c34e46 mysql:5 "docker-entrypoint.s…" 11 days ago Up 11 days 3306/tcp, 33060/tcp, 0.0.0.0:13306->13306/tcp, :::13306->13306/tcp docker.mysql

Thank you in advance!

PHP Yaml Module still not loaded

Hello @vagnercardosoweb,

This is inline with the issue I've opened under #10 wherein I've already pulled the changes to my machine and down/up my docker. However, PHP Yaml module is still not present in the loaded PHP modules. I've pasted the output in the link above. Any steps that I've missed? TIA!

docker.php does always restart

Description:
After cloning the repository and starting docker with default settings docker compose up --build" docker.php goes into restarting mode.

Steps to Reproduce:

  1. clone repo
  2. navigate into directory and run docker compose up --build

Expected Behavior:
docker.php is starting without any error

Actual Behavior:
output:

docker.php exited with code 127
': No such file or directoryn't execute 'bash
': No such file or directoryn't execute 'bash
': No such file or directoryn't execute 'bash
': No such file or directoryn't execute 'bash
': No such file or directoryn't execute 'bash
': No such file or directoryn't execute 'bash
': No such file or directoryn't execute 'bash
': No such file or directoryn't execute 'bash

Additional Information:

  • Operating System: Win11
  • Error Message: ': No such file or directoryn't execute 'bash

Impact:
This issue prevents users from accessing localhost. Result is "502 Bad Gateway" page.

It has sth. to do with entrypoint script.
If you comment out Line 104 in docker/php/Dockerfile it works.

xdebug not stopping + PhpStorm using port 9000

A few weeks ago I used this project as a platform for a simple page and it worked. Today I used it on a different one and this new one does not stop when debugging. The only difference I see is that now there's a single .ini file instead of one for PHP and one for XDEBUG. Also, XDebug section now does not contain zend_extension = xdebug.so
Are you able to keep debugging?

NOTE: I also had to change port 9000 to 9002 cause the new version of PhpStorm uses it idk what for.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.