A simple docker image with PHP + Composer + Xdebug
1.2K
This image contains three main resources: PHP, composer and Xdebug. All of them are explained below:
PHP is a server-side scripting language designed for web development, but which can also be used as a general-purpose programming language.
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.
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.
FROM tombenevides/xdebug-composer:php-8.2
COPY . /usr/src/myapp
WORKDIR /usr/src/myapp
CMD [ "php", "./your-script.php" ]
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.
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.
FROM tombenevides/xdebug-composer:php-8.2
RUN install-php-extensions pdo_mysql
[...]
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.
Content type
Image
Digest
sha256:2481ea7ac…
Size
230.4 MB
Last updated
over 3 years ago
docker pull tombenevides/xdebug-composer