Merge pull request #20 from pavel-mironchik/apt-autoremove

The `--cleanup` option also uses an `apt autoremove` command.
pull/22/head
Michele Locati 2019-05-17 09:54:55 +02:00 committed by GitHub
commit dece414ae3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 8 deletions

View File

@ -24,7 +24,7 @@ RUN chmod uga+x /usr/local/bin/install-php-extensions && sync && \
```
`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), you can use the `--cleanup` option (**EXPERIMENTAL**):
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**):
```
install-php-extensions --cleanup gd xdebug
```
@ -128,10 +128,10 @@ Some extension has special requirements:
## How to contribute
- If you want to add support for a new PHP extension:
1. change the `install-php-extensions` script
2. update the `data/supported-extensions` file, adding a new line with the handle of the extension and the list of supported PHP versions
3. if the extension requires ZTS images:
add a new line to the `data/special-requirements` file, with the extension handle followed by a space and `zts`
- If you want to change the list of supported PHP versions for an already supported extension:
1. change the `install-php-extensions` script
2. update the `data/supported-extensions` file, adding the new PHP version to the existing line corresponding to the updated extension
1. change the `install-php-extensions` script
2. update the `data/supported-extensions` file, adding a new line with the handle of the extension and the list of supported PHP versions
3. if the extension requires ZTS images:
add a new line to the `data/special-requirements` file, with the extension handle followed by a space and `zts`
- If you want to change the list of supported PHP versions for an already supported extension:
1. change the `install-php-extensions` script
2. update the `data/supported-extensions` file, adding the new PHP version to the existing line corresponding to the updated extension

View File

@ -574,6 +574,11 @@ then
fi
fi
done
if test -n "${DO_APT_REMOVE}"
then
printf '### REMOVING NO LONGER REQUIRED PACKAGES ###\n'
DEBIAN_FRONTEND=noninteractive apt autoremove -y
fi
if test -n "${UNNEEDED_APT_PACKAGES}"
then
printf '### REMOVING UNNEEDED APT PACKAGES ###\n'