# php-docker - A way to run PHP-FPM with additional modules inside docker.
# Copyright (C) 2021 php-docker contributers (please see "CONTRIBUTERS"
# file in the root directory of this repository)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
FROM php:8.0-fpm-alpine
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod uga+x /usr/local/bin/install-php-extensions && sync && \
install-php-extensions zip ssh2 pdo_mysql mysqli
COPY docker-php-entrypoint-custom /usr/local/bin/
RUN chmod 775 /usr/local/bin/docker-php-entrypoint-custom
ENTRYPOINT ["docker-php-entrypoint-custom"]
CMD ["php-fpm"]