https://github.com/hacklabr/docker-php
https://github.com/hacklabr/docker-php
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/hacklabr/docker-php
- Owner: hacklabr
- Created: 2017-04-26T19:39:55.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2025-04-30T18:29:25.000Z (about 1 year ago)
- Last Synced: 2025-04-30T19:39:56.896Z (about 1 year ago)
- Language: Dockerfile
- Size: 101 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PHP
A PHP image extended to bundle libraries commonly used in PHP projects. The following
libraires are included:
* libpng12
* libjpeg
* libmemcached
* libmcrypt
* gd
* mysqli
* opcache
* zip
* mbstring
* mcrypt
* memcache
* memcached
* xdebug
## Usage
### Simple server
```
docker run --name elephant -v /path/to/project:/var/www/html -d hacklabr/php
```
### Development with Atom and php-debug
When creating your container, enable XDebug by setting env variable `XDEBUG`
```
docker run --name elephant -e XDEBUG=1 -v /path/to/project:/var/www/html -d hacklab/php
```
Tell your Atom about folder mapping by editin `config.cson`. You have to configure the
section called "php-debug". It should look like this:
```
"php-debug":
PathMaps: [
"remotepath;localpath"
"/var/www/html/;/home/fabio/devel/catraca/src/"
]
PhpException:
CatchableFatalError: false
Deprecated: false
FatalError: false
Notice: false
ParseError: false
StrictStandards: false
UnknownError: false
Warning: false
Xdebug: false
ServerPort: 9000
```
### Extending with new configurations
You can extend this image with a Dockerfile. Imagine you want to let your user
upload 2GB files.
```
FROM hacklab/php
LABEL mantainer "Hacklab "
RUN { \
echo "file_uploads = On"; \
echo "upload_max_filesize = 2048M";\
echo "post_max_size = 2048M"; \
echo "max_file_uploads = 20"; \
} > /usr/local/etc/php/conf.d/docker-max-upload.ini
USER root
```