Skip to content

Instantly share code, notes, and snippets.

@thiagobit
Created November 28, 2019 14:36
Show Gist options
  • Select an option

  • Save thiagobit/0cdaa2f6dcaf6133471cd83bc4b36c1f to your computer and use it in GitHub Desktop.

Select an option

Save thiagobit/0cdaa2f6dcaf6133471cd83bc4b36c1f to your computer and use it in GitHub Desktop.
Dockerfile with PHP-FPM Alpine, extensions installation and php.ini configuration
FROM php:7.1-fpm-alpine
RUN apk update; \
apk upgrade; \
apk add libxml2-dev libpng-dev git
# installing extensions
RUN docker-php-ext-install mysqli soap mbstring xml pdo_mysql gd zip
# using production php.ini
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
# enabling short tag
RUN sed -i "s/short_open_tag = Off/short_open_tag = On/" "$PHP_INI_DIR/php.ini"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment