Git Product home page Git Product logo

docker-php7-fpm's Introduction

PHP 7.4 FPM

All-purpose PHP-FPM 7.4 Docker image that comes with the most popular extensions.

Docker Pulls Docker Stars Travis CI GitHub issues MicroBadger Layers GitHub stars MIT License

Don't worry about building complex Docker images for your Laravel, Lumen or other PHP 7.4+ applications. Just use this lightweight and convenient image.

$ docker pull otherguy/php7-fpm:7.4

๐ŸŒˆ Quick Start

Create your Docker image

Base your Docker image on otherguy/php7-fpm:7.4, add your project files and you're ready to go!

# Dockerfile
FROM otherguy/php7-fpm:7.4

COPY --chown=www-data:www-data . /srv

Customize PHP settings

If you want to change the PHP configuration or overwrite some defaults, simply create your own configuration file, have the filename start with a z and add it to the image.

# zz-custom.ini
post_max_size       = 100M
upload_max_filesize = 100M
# Dockerfile
...
COPY zz-custom.ini /usr/local/etc/php/conf.d/
...

Add PHP extensions

It's simple to add your own extensions to the image!

# Dockerfile
...
RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
 && pecl install mongodb \
 && docker-php-ext-enable mongodb
...

๐Ÿ“š Description

This is a docker image for an all-purpose PHP-FPM (PHP Version 7.4) container. It is based on the 7.4-fpm-alpine tag of the official PHP Docker image. Patch version upgrades are therefore done automatically on build (e.g. 7.4.11 to 7.4.12) but for minor version upgrades (e.g. 7.3.x to 7.4.x), a new Dockerfile should be created and tagged appropriately.

๐Ÿ†• New and Removed Features

There are some new features and deprecated modules that made changes to the Dockerfile necessary:

  • mcrypt has been deprecated in 7.1 and removed in 7.2 in favor of OpenSSL
  • PHP 7.4 includes many of the extensions that were previously installed manually, so only gd, intl, opcache and PDO are installed through this image

๐Ÿงฎ Extensions

The installed extensions are enough for Laravel 8 projects as long as the project is using either PostgreSQL, MySQL or SQLite. If you need other database drivers/extensions, please fork this image and submit a pull requests, or simply install it in your own image.

This is the full list of extensions available to PHP in this image:

  • ctype
  • curl
  • date
  • dom
  • fileinfo
  • filter
  • ftp
  • gd
  • hash
  • iconv
  • intl
  • json
  • libxml
  • mbstring
  • mysqli
  • mysqlnd
  • openssl
  • pcre
  • PDO
  • pdo_mysql
  • pdo_pgsql
  • pdo_sqlite
  • Phar
  • posix
  • readline
  • Reflection
  • session
  • SimpleXML
  • sodium
  • SPL
  • sqlite3
  • standard
  • tokenizer
  • xml
  • xmlreader
  • xmlwriter
  • Zend OPcache
  • zip
  • zlib

๐Ÿ›  Building

In order to build this image yourself, simply run the following command:

$ docker build -t otherguy/php7-fpm:7.4 .

๐Ÿšง Contributing

Pull Requests are more than welcome!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.