Sign inSign up

tombenevides/xdebug-composer

By tombenevides

•Updated over 1 year ago

A simple docker image with PHP + Composer + Xdebug

Image
0

1.2K

tombenevides/xdebug-composer repository overview

⁠Quick Reference

⁠Maintained by Tom Benevides:

⁠Supported tags

  • latest
  • php-8.2
  • php-8.1
  • php-8.0
  • php-7.4

⁠Image main resources

This image contains three main resources: PHP, composer and Xdebug. All of them are explained below:

⁠What is PHP

PHP is a server-side scripting language designed for web development, but which can also be used as a general-purpose programming language.

⁠What is Composer

Composer is a tool for dependency management in PHP, written in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you. In this image, we are using Composer v2.

⁠What is Xdebug

Xdebug is an extension for PHP, and provides a range of features to improve the PHP development experience. These features includes step debbuging, error reporting, tracing, profiling and code coverage analysis.

⁠How to use this image

⁠Create a Dockerfile in your project:
FROM tombenevides/xdebug-composer:php-8.2

COPY . /usr/src/myapp
WORKDIR /usr/src/myapp

CMD [ "php", "./your-script.php" ]
⁠Run as script:
docker run --rm -it \
    -u $(id -u):$(id -g) \
    -v $(pwd):/usr/src/myapp \
    tombenevides/xdebug-composer:php-8.2 php public/index.php

The image already sets the working directory to /usr/src/myapp. If you want to specify a new path, just do it with the flag -w.

⁠Available extensions:

bcmath, Core, ctype, curl, date, dom, fileinfo, filter, ftp, gd, hash, iconv, igbinary, imap, json, libxml, mbstring, msgpack, mysqlnd, openssl, pcntl, pcre, PDO, pdo_sqlite, Phar, posix, random, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xdebug, xml, xmlreader, xmlwriter, zlib.

⁠Add more extensions:
FROM tombenevides/xdebug-composer:php-8.2

RUN install-php-extensions pdo_mysql
[...]

⁠License

View license information⁠ for the software contained in this image.

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

Tag summary

Content type

Image

Digest

sha256:2481ea7ac…

Size

230.4 MB

Last updated

over 3 years ago

docker pull tombenevides/xdebug-composer