GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Crix4lis/docker-php-cli-xdebug: Provides basic php-cli docker image with installed Composer and configured xDebug along with PHPStorm IDE configuration manual. Use it as starting point to your custom PHP application based on whatever you want, like Symfony

BranchesTags
Open more actions menu

Latest commit

 

History

14 Commits
14 Commits

Folders and files

NameName
Last commit message
Last commit date
docker
docker
 
 
.gitignore
.gitignore
 
 
NOTES.md
NOTES.md
 
 
README.md
README.md
 
 
docker-compose.yml
docker-compose.yml
 
 

Repository files navigation

author: Michał Powała
source repository: docker-php-cli-xdebug

docker-php-cli-xdebug

This repository contains running PHP CLI docker image with slightly extended official php imgage. It's extended with configured xDebug extension and installed Composer. The repostory is useful as basic image for any PHP application. Use Composer to download needed dependencies, libraries or PHP frameworks like Symfony.

HOW TO USE IT

  1. Install Docker: OFFICIAL INSTRUCTION
  2. Install Compose: OFFICIAL INSTRUCTION
  3. Change directory to dir you cloned the repo and type: docker-compose up -d
  4. Enter the container: docker-compose exec cli bash
  5. Turn on and turn off debugging mode with: xdebugstart and xdebugstop
  6. Run your script with: php your_script.php

HOW TO SET UP YOUR PHPSTORM IDE

  1. Go to options
  2. Go to Languages & Frameworks > PHP > Debug
  3. Scroll down to "Xdebug" section
  4. Make sure:
    • Debug port is set to: 9000
    • Can accept external connections is set to: checked
  5. Go to Languages & Frameworks > PHP > Servers and set up:
    • Name: docker-xdebug-server
    • Host: does not matter
    • Port: does not matter
    • Debugger: Xdebug
    • Use path mappings: checked
    • Absolute path on the server: /volume

DON'T FORGET: to start listening for PHP Debug connections in the IDE:
Start Listening for PHP Debug connections picture

HOW TO TURN ON AND TURN OFF XDEBUG SESSION

Inside docker container type (via bash):

  • To turn on: xdebugstart
  • To turn off: xdebugstop

About

Provides basic php-cli docker image with installed Composer and configured xDebug along with PHPStorm IDE configuration manual. Use it as starting point to your custom PHP application based on whatever you want, like Symfony

Topics

alpinecomposerdebugerdebugging-tooldockerdocker-composedocker-phpcliidephpphp-cliphp7-2phpstormsymfonyxdebug

Resources

Readme
Activity

Stars

5 stars

Watchers

1 watching

Forks

2 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.