Code Monkey home page Code Monkey logo

docker-images-php's Introduction

PHP Docker Images

Docker Image CI Docker Pulls

Supported Tags

Images are built and tagged using both stable and version specific tags to support pinning downstream builds to latest available for 7.4 or to a specific version such as 7.4.16. Please reference the image repository on Docker Hub for a complete list of available tags. Builds are automatically run on the 1st of each month and/or when changes are pushed to the master branch of this repository.

  • 8.1, 8.1-loaders, 8.1-fpm, 8.1-fpm-loaders
  • 8.0, 8.0-loaders, 8.0-fpm, 8.0-fpm-loaders
  • 7.4, 7.4-loaders, 7.4-fpm, 7.4-fpm-loaders
  • 7.3, 7.3-loaders, 7.3-fpm, 7.3-fpm-loaders
  • 7.2, 7.2-loaders, 7.2-fpm, 7.2-fpm-loaders

The -loaders suffix indicates the image includes both Source Guardian and IonCube loaders. These should only be used when encoded PHP is present in a project.

Images for older versions of PHP may be available (see Docker Hub for available tags) but they are no longer actively maintained.

Additional Extensions

These images are built top of the official CentOS Stream 8 images using Remi's RPMs Repository to install PHP and include the following extensions:

  • bcmath
  • gd
  • gmp
  • intl
  • json
  • mbstring
  • msgpack
  • sodium
  • mysqlnd
  • opcache
  • pdo
  • amqp
  • redis
  • imagick
  • process
  • soap
  • xml
  • xmlrpc
  • zip

Other Inclusions

  • composer - dependency manager for PHP packages
  • git - version control system (used by composer)
  • npm - package manager for the Node JavaScript platform
  • patch - apply a diff file to an original (used by composer)
  • unzip - list, test and extract compressed files in a ZIP archive (used by composer)
  • pwgen - password generator used in scripting creation of passwords meeting specific criteria
  • ncat - networking utility which reads and writes data across networks from the command line
  • jq - commandline JSON processor for use in scripts and pipelines

docker-images-php's People

Contributors

davidalger avatar den4ik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

docker-images-php's Issues

Issue with current image centos:8 build

It looks like the maintainers of centos:8 images have some urgent updates causing epel mirror checksums to fail without the latest.

docker run -it --rm davidalger/php:7.4-fpm dnf update

This will fail at the moment with

Error: Failed to download metadata for repo 'epel': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

Looks like there is a fix in latest 8 tag

docker run -it --rm centos:8 dnf update

If you could manually trigger your git workflow CI to get the update, much appreciated.

Version 8.2

Kindly please create version for PHP 8.2. Is that possible?

Thank you in advance!

cURL version

First of all: thank you for all your great work on Warden! I love the solution you've built :).

I'm running into some problems caused by missing cURL constants:

image
(shell created from docker run -it davidalger/php:7.4 /bin/bash)

CURLHEADER_SEPARATE was introduced in cURL version 7.37.0.
CURLINFO_SCHEME was introduced in cURL version 7.52.0.

CentOS 7.9 has cURL version 7.29.0 (dated from 2013).

I'm not sure if I'm in a very rare use case, but do you see any possibilities?

  • I looked up the SCL repo, but that doesn't seem to contain a cURL upgrade).
  • Downloading a newer release will probably not work, because I believe that many programs are linked with the default cURL libs).

Willing to collaborate!

Feasibility of switching Linux images to Debian

All linux-based images (PHP, Varnish, etc.) currently use centos:8. The main issue that I came across with this is that, there are no ARM builds for PHP. Remi doesn't have ARM builder, so there's no ETA on this either. This is currently the biggest blocker that I've come across while trying to make Warden multi-platform (Intel & Apple Silicon).

My current approach: https://github.com/drpayyne/docker-php. I have rebuilt all the four images (CLI & FPM, both with & without loaders) as multi-platform Docker images. BUT. I had to switch to Fedora. Since Remi doesn't provide PHP for ARM, and neither does CentOS itself (CentOS provides some extensions, but not all). I had to switch to Fedora, which provides PHP and all its extensions for both platforms.

My question: can we either switch to Fedora... or... Debian?

Our two main dependencies in this repo are - Docker and PHP. Why not use the official PHP Docker image? Its homepage lists all the available tags and guides.

These official PHP Docker images use Debian underneath so here's my question. Is it feasible to switch to these images? For supporting both platforms, for quick updates, for official support, etc.

I currently have made Warden work with PHP 7.4 on my Apple Silicon, but 7.3 is looking very tough to make work, and I've no idea about 8.0 yet - USING Fedora. On the other hand, switching to these official PHP Docker images seem like the right way forward.

Am I blatantly missing anything? What are your thoughts? I'm actively trying to make Warden work as smooth as possible for both platforms, so any feedback is appreciated. Thank you!

Composer 2.2 (LTS)

Can you please add composer 2.2 as another version and also add env param which will defifne which version shall be used as default?

Currently in my scripts running in this container, first thing I have to run is:

rm -f /usr/bin/composer
curl -sS https://getcomposer.org/installer | php -- --2.2 --install-dir=/usr/bin --filename=composer

It would be easier if it would respect env variable (which can default to 1 for backwards compatibility).

FYI I am using this image with bitbucket pipelines so I am limited with what I can do with it.

Appreciated!

Please need hlep installing ext-ssh2

Hello, first of all, thank you for making your work available to us.
Im not very knowledgeable here.

Im trying to install ext-ssh2 extension. Ultimately, i would like to create my own image with the extension installed.

Currently in my container i noticed pecl is not installed. So I decided to install php-pear.
when i install it like so sudo yum install php-pear
it installs php-pear noarch 1:1.9.4-21.el7
once installed, when i run pecl this error shows up.
PHP Parse error: syntax error, unexpected 'new' (T_NEW) in /usr/share/pear/PEAR/Frontend.php on line 91
I cant get past this error.

Please how can I install this extension ?
And if i wanted to create an image/dockerfile from yours, how can I have ext-ssh2 installed ?

Thank you.

IUS Project Based Images Deprecation

These PHP images will shortly be rebuilt based on the Remi RPMs (https://rpms.remirepo.net/) rather than on those published via the IUS Project (https://ius.io/). This is being done with longevity of these images in mind, and to better enable speedy updates and following the PHP release cycle.

As part of the move to Remi, the IUS based images available here will be deprecated effective immediately. The IUS based images have been pushed to Docker Hub with an additional -ius suffix and will remain available for at least the next 90 days, after which they may be removed and will no longer be available (old Dockerfiles could still be used by you to build IUS based images as-needed should you not be able to migrate to using the Remi RPMs).

Images were moved via the following process:

  1. Fetch major release tags:
$ tags=$(curl -s https://registry.hub.docker.com/v1/repositories/davidalger/php/tags | jq -r '.[].name' | grep -E '[0-9]\.[0-9]')
$ for tag in $tags; do echo $tag; done
5.5
5.5-fpm
5.5-fpm-loaders
5.5-loaders
5.6
5.6-fpm
5.6-fpm-loaders
5.6-loaders
7.0
7.0-fpm
7.0-fpm-loaders
7.0-loaders
7.1
7.1-fpm
7.1-fpm-loaders
7.1-loaders
7.2
7.2-fpm
7.2-fpm-loaders
7.2-loaders
7.3
7.3-fpm
7.3-fpm-loaders
7.3-loaders
7.4
7.4-fpm
7.4-fpm-loaders
7.4-loaders
  1. Pull and retag the image with -ius suffix applied, then push the new tag to docker hub:
$ for tag in $tags; do docker pull davidalger/php:$tag; done
$ for tag in $tags; do docker image tag davidalger/php:$tag davidalger/php:$tag-ius; done
$ for tag in $tags; do docker push davidalger/php:$tag-ius; done
  1. List new tags from Docker Hub:
$ curl -s https://registry.hub.docker.com/v1/repositories/davidalger/php/tags | jq -r '.[].name' | grep ius\$ | sort -nr
7.4-loaders-ius
7.4-ius
7.4-fpm-loaders-ius
7.4-fpm-ius
7.3-loaders-ius
7.3-ius
7.3-fpm-loaders-ius
7.3-fpm-ius
7.2-loaders-ius
7.2-ius
7.2-fpm-loaders-ius
7.2-fpm-ius
7.1-loaders-ius
7.1-ius
7.1-fpm-loaders-ius
7.1-fpm-ius
7.0-loaders-ius
7.0-ius
7.0-fpm-loaders-ius
7.0-fpm-ius
5.6-loaders-ius
5.6-ius
5.6-fpm-loaders-ius
5.6-fpm-ius
5.5-loaders-ius
5.5-ius
5.5-fpm-loaders-ius
5.5-fpm-ius

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.