PHP running on alpine base Docker Image with or without Nginx π³
GitHub Workflow Status (with event) LICENSE Stars Count Forks Count Watchers Count Issues Count Pull Request Count Follow
To pull the docker image:
docker pull ghcr.io/dnj/php-alpine:8.3-mysql-nginx
To run from current dir
docker run -v $(pwd):/var/www/html -p 80:80 ghcr.io/dnj/php-alpine:8.3-mysql-nginx- Composer ( v2 - updated )
- Tasker instead of CRON
- Go-Supervisor
- Alpine base image
- opcache
- mysqli or pgsql
- pdo
- pdo_mysql or pdo_pgsql
- sockets
- json
- intl
- gd
- xml
- zip
- bz2
- pcntl
- bcmath
- inotify
- redis
- memcached
- exif
- dom
- soap
- ssh2
You can add additional PHP Extensions by running docker-ext-install command. Don't forget to install necessary dependencies for required extension.
FROM ghcr.io/dnj/php-alpine:8.3-mysql-nginx RUN docker-php-ext-install xdebug
FROM ghcr.io/dnj/php-alpine:8.3-mysql-nginx echo '0 * * * * /usr/local/bin/php /var/www/artisan schedule:run >> /dev/null 2>&1' >> /etc/crontab
You can add your own Supervisor config inside /etc/supervisor.d/. File extension needs to be *.ini. By default this image added nginx, php-fpm and taker process in supervisor.
E.g: For a nodejs program you can make file my-websocket-app.ini
[program:my-websocket-app] process_name=%(program_name)s command=node /app/socket.js autostart=true autorestart=true redirect_stderr=true
On your Docker image
FROM ghcr.io/dnj/php-alpine:latest ADD my-websocket-app.ini /etc/supervisor.d/
For more details please refrer to QPod/supervisord documentions.
If you find any bugs, please report it by submitting an issue on our issue page with a detailed explanation. Giving some screenshots would also be very helpful.
You can also submit a feature request on our issue page or discussions and we will try to implement it as soon as possible.