mirror of
https://github.com/danog/docker-php-extension-installer.git
synced 2024-12-02 09:27:58 +01:00
Merge pull request #36 from freezy-sk/docker
Building docker image for easier installation
This commit is contained in:
commit
d58b93905b
8
Dockerfile
Normal file
8
Dockerfile
Normal file
@ -0,0 +1,8 @@
|
||||
FROM bash AS build
|
||||
|
||||
COPY install-php-extensions /tmp/install-php-extensions
|
||||
RUN chmod +x /tmp/install-php-extensions
|
||||
|
||||
FROM scratch
|
||||
|
||||
COPY --from=build /tmp/install-php-extensions /usr/bin/install-php-extensions
|
10
README.md
10
README.md
@ -23,6 +23,16 @@ RUN chmod uga+x /usr/local/bin/install-php-extensions && sync && \
|
||||
install-php-extensions gd xdebug
|
||||
```
|
||||
|
||||
Installation via COPY --from
|
||||
|
||||
```
|
||||
FROM php:7.2-cli
|
||||
|
||||
COPY --from=docker-install-php-extensions /usr/bin/install-php-extensions /usr/bin/
|
||||
|
||||
RUN install-php-extensions gd xdebug
|
||||
```
|
||||
|
||||
`install-php-extensions` will install all the required APT packages.
|
||||
If you want to remove the APT development packages (which shouldn't be needed after the PHP extensions have been installed) and other no longer required packages, you can use the `--cleanup` option (**EXPERIMENTAL**):
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user