Code Monkey home page Code Monkey logo

php-7.3-rc-xdebug-alpine's Introduction

Docker Pulls

Image description

This image contain php-7.3-RC based on alpine with xDebug, MySQL, PostgreSQL, Redis & GD enabled and Composer already installed

PHP 7.3.0RC6 (cli) (built: Nov 27 2018 23:02:16) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.0-dev, Copyright (c) 1998-2018 Zend Technologies
    with Xdebug v2.7.0beta2-dev, Copyright (c) 2002-2018, by Derick Rethans

I've set it up to auto-build once the base image updated, but I cant be sure that it will work

Runing the image:

By default xdebug is enabled, to disable it you need to create a .env file which should contain the following variables, but remember to change the value based one what you want to achieve:

PHP_XDEBUG_DEFAULT_ENABLE=0
PHP_XDEBUG_REMOTE_ENABLE=0
PHP_XDEBUG_REMOTE_HOST=127.0.0.1
PHP_XDEBUG_REMOTE_PORT=9001
PHP_XDEBUG_REMOTE_AUTO_START=0
PHP_XDEBUG_REMOTE_CONNECT_BACK=0
PHP_XDEBUG_IDEKEY=docker
PHP_XDEBUG_PROFILER_ENABLE=0
PHP_XDEBUG_PROFILER_OUTPUT_DIR=/tmp

Then run the docker and specify the env file that you have created like this

docker run --env-file .env -p 80:80 zaherg/php-7.3-rc-xdebug-alpine

Installed modules information

It has the following modules:

[PHP Modules]

  1. Core
  2. ctype
  3. curl
  4. date
  5. dom
  6. fileinfo
  7. filter
  8. ftp
  9. gd
  10. hash
  11. iconv
  12. intl
  13. json
  14. libxml
  15. mbstring
  16. mysqlnd
  17. openssl
  18. pcre
  19. PDO
  20. pdo_mysql
  21. pdo_pgsql
  22. pdo_sqlite
  23. pgsql
  24. Phar
  25. posix
  26. readline
  27. redis
  28. Reflection
  29. session
  30. SimpleXML
  31. sodium
  32. SPL
  33. sqlite3
  34. standard
  35. tokenizer
  36. xdebug
  37. xml
  38. xmlreader
  39. xmlwriter
  40. zip
  41. zlib

[Zend Modules]

  1. Xdebug

GD information

GD Support => enabled
GD Version => bundled (2.1.0 compatible)
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.9.1
GIF Read Support => enabled
GIF Create Support => enabled
JPEG Support => enabled
libJPEG Version => 8
PNG Support => enabled
libPNG Version => 1.6.34
WBMP Support => enabled
XBM Support => enabled

Directive => Local Value => Master Value
gd.jpeg_ignore_warning => 1 => 1

php-7.3-rc-xdebug-alpine's People

Contributors

zaherg avatar

Stargazers

 avatar

Watchers

 avatar

php-7.3-rc-xdebug-alpine's Issues

Permission denied when using FPM as socket and with www-data rights

Why the PHP has to run as root user?

NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
ERROR: unable to bind listening socket for address '/sock/fpm7.sock': Permission denied (13)
ERROR: FPM initialization failed
exited with code 78

This is my docker-compose.yml

version: '3.3'

services:
  php:
    container_name: webdev_php
    image: zaherg/php-7.3-rc-xdebug-alpine
    working_dir: /website
    user: 'www-data:users'
    environment:
      - PHP_XDEBUG_DEFAULT_ENABLE=0
      - PHP_XDEBUG_REMOTE_ENABLE=0
      - PHP_XDEBUG_REMOTE_HOST=127.0.0.1
      - PHP_XDEBUG_REMOTE_PORT=9001
      - PHP_XDEBUG_REMOTE_AUTO_START=0
      - PHP_XDEBUG_REMOTE_CONNECT_BACK=0
      - PHP_XDEBUG_IDEKEY=docker
      - PHP_XDEBUG_PROFILER_ENABLE=0
      - PHP_XDEBUG_PROFILER_OUTPUT_DIR=/tmp
    volumes:
      - ./app/www:/website
      - ./app/conf/php.ini:/usr/local/etc/php/conf.d/40-custom.ini:ro
      - ./app/conf/php-sock.conf:/usr/local/etc/php-fpm.d/zz-docker.conf:ro
      - socket:/sock
    ports:
      - 9001:9001
    networks:
      network:
        ipv4_address: 172.72.0.3
    command: ['php-fpm']
    depends_on:
      - mariadb

  nginx:
    container_name: webdev_nginx
    image: nginx
    working_dir: /website
    volumes:
      - ./app/www:/website
      - ./app/logs:/var/log/nginx
      - ./app/conf/nginx-main.conf:/etc/nginx/nginx.conf:ro
      - ./app/conf/nginx-sock.conf:/etc/nginx/conf.d/default.conf:ro
      - socket:/sock
    networks:
      network:
        ipv4_address: 172.72.0.4
    ports:
      - 8000:80
    command: [nginx, '-g', 'daemon off;']
    # Wait for php-fpm socket
    depends_on:
      - php

networks:
  network:
    driver: bridge
    external: false
    ipam:
      config:
        - subnet: 172.72.0.0/16

volumes:
  socket:

And this is zz-docker.conf

[global]
daemonize = no

[www]
listen = /sock/fpm7.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0660

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.