Optimized image for running Hyperf applications with PostgreSQL and Swoole support.
2.6K
Optimized image for running Hyperf applications with PostgreSQL and Swoole support.
This Docker image is designed to provide an optimized environment for Hyperf applications running PHP 8.3, supporting both development and production environments.
It includes specific configurations for Xdebug, Sonar Scanner, PHP performance tuning, and static code analysis support.
docker run --rm --name hyperf -d -v "$(pwd):/opt/www" -p "8080:9501" --platform linux/amd64 devitools/hyperf:8.3-dev
Dockerfile Ready for ProductionFROM devitools/hyperf:8.3
COPY . /opt/www
RUN composer install --prefer-dist --no-dev --optimize-autoloader
docker-compose.yml Ready for devservices:
app:
image: devitools/hyperf:8.3-dev
container_name: template_name-app
command: [ "server:watch" ]
volumes:
- ./:/opt/www
ports:
- "9501:9501"
environment:
- SCAN_CACHEABLE=false
- STDOUT_LOG_LEVEL=alert,critical,emergency,error,warning,notice,info
restart: on-failure
SCAN_CACHEABLE: Controls Hyperfβs scan cache.STDOUT_LOG_LEVEL: Sets the log levels sent to stdout.docker-compose up -d
Dockerfile Repository (Source code for this image):
π github.com/devitools/dockerfileβ
Example Project (Hyperf with this image):
π github.com/phpcomrapadura/hyperf-com-rapaduraβ
The image includes:
The image configuration is handled through the following scripts:
setup.shsetup-dev.shxdebug.ini for PHPStorm integration.The image can be built in two ways: for development and for production.
Includes Xdebug, PCOV, and Sonar Scanner for debugging and code analysis.
docker build --platform="linux/amd64" --build-arg APP_TARGET=dev -t devitools/hyperf:8.3-dev .
Removes development tools to optimize the runtime environment.
docker build --platform="linux/amd64" -t devitools/hyperf:8.3 .
| Version | Included Features |
|---|---|
devitools/hyperf:8.3-dev | PHP 8.3 + Xdebug + PCOV + Sonar Scanner |
devitools/hyperf:8.3 | PHP 8.3 optimized for production |
To run a container based on the image:
docker run --rm -it devitools/hyperf:8.3-dev php -v
To start a Hyperf project with the image:
docker run --rm -it -v $(pwd):/opt/www devitools/hyperf:8.3-dev composer create-project hyperf/hyperf-skeleton .
This image provides a complete environment for developing and running Hyperf applications, ensuring productivity and code quality.
Content type
Image
Digest
sha256:6fe081035β¦
Size
36 MB
Last updated
over 1 year ago
docker pull devitools/hyperf