Skip to content

Add documentation for installing extension. #125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions php/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,18 @@ same commands to build and run:
Where `src/` is the directory containing all your php code and `config/`
contains your `php.ini` file.

## How to install more PHP extensions

We provide a convenient script named `docker-php-ext-install`, you can use it to easily install PHP extension. If you want to have a PHP container with more extensions, you can write your own Dockerfile like this:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you wrap these lines at 80 chars?

Also, should be mentioned that docker-php-ext-install doesn't handle dependencies and that this has to be done manually?


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit; describe what the example does? "This example installs foo and bar"? (not sure)

FROM php:5.5.19-fpm
# Install modules
RUN apt-get update && apt-get install -y \
apt-utils re2c g++ \
zlib1g zlib1g-dbg zlib1g-dev zlibc \
&& docker-php-ext-install gd
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we think of an example that installs at least two extensions to illustrate how that should be done
and take away confusion on usage of the script (e.g. should it be used docker-php-ext-install ext1 ext2 ext3?)

CMD ["php-fpm"]

### Without a `Dockerfile`

If you don't want to include a `Dockerfile` in your project, it is sufficient to
Expand Down