mirror of
https://github.com/Dannecron/php-for-dev.git
synced 2025-12-25 16:12:35 +03:00
e7157ca689f07ecd72e7cecfe298f1ddc120ee4c
bump composer version for all php minors, bump xdebug version for 8.0.x
Docker images with php and composer inside
Images can be found on docker hub
Supported versions
- php 8.0.12
- composer 2.1.12
- xdebug 3.1.0
- php 7.4.24 (latest)
- composer 1.10.23
- xdebug 2.9.8
- rdkafka 3.1.2
- timecop 1.2.10
- php 7.3.32
- composer 1.10.23
- xdebug 2.9.8
- rdkafka 3.1.2
- timecop 1.2.10
- php 7.2.34
- composer 1.10.23
- xdebug 2.7.2
- rdkafka 3.1.2
- timecop 1.2.10
All images now include zsh, that allowed using oh-my-zsh and its plugins for improving user experience.
Build
To build container just use one of this commands:
make build-72
make build-73
make build-74
make build-80
Run
After making image run
docker run -it --rm -v `pwd`:/var/www/project -w /var/www/project --user=1000 php-for-dev:7.* sh
where replace * minor php version.
Using oh-my-zsh from local machine
To use already installed oh-my-zsh inside docker container we should pass couple volumes and environment variables:
-v .zshrc:/home/user/.zshrc- configuration file forzsh-v .oh-my-zsh:/home/user/oh-my-zsh- directory with installedoh-my-zsh-e HOME=/home/user- define user home directory
Full run command would be looks like
docker run -it --rm \
-v `pwd`:/var/www/project \
-v .zshrc:/home/user/.zshrc \
-v .oh-my-zsh:/home/user/oh-my-zsh \
-e HOME=/home/user \
-w /var/www/project \
--user=1000 php-for-dev:7.* sh
Languages
Dockerfile
90.3%
Makefile
9.7%