Skip to content

Conversation

@erikaheidi
Copy link
Contributor

@erikaheidi erikaheidi commented Jun 29, 2023

The current php build in Wolfi is very simple, with just a few built-in, common extensions. This makes it hard to use Wolfi-based PHP images as replacement for Alpine and Debian PHP images.

This PR improves the PHP build to include several extensions as shared libraries that will live in subpackages such as php-curl, php-openssl, etc.

With this new build in place it will be easier to add more extensions when dependencies are met (for instance, the php-zip package depends on libzip which is not yet available in Wolfi).

Full list of extensions now available as subpackages php-${EXTENSION}:

  • bz2: Bzip2
  • curl: cURL
  • gd: GD imaging
  • gmp: GNU GMP support
  • ldap: LDAP
  • mysqlnd: MySQLnd
  • openssl: OpenSSL
  • pdo_mysql: MySQL driver for PDO
  • pdo_sqlite: SQLite 3.x driver for PDO
  • soap: SOAP
  • sodium: Sodium
  • calendar: Calendar
  • exif: EXIF
  • gettext: GetText
  • intl: Internationalization
  • mbstring: Multibyte String Functions
  • opcache: Opcache
  • pcntl: pcntl
  • pdo: PHP Data Objects
  • sockets: Sockets
  • xsl: XSL
  • bcmath: BC Math
  • ctype: ctype
  • iconv: Iconv
  • dom: DOM
  • pgsql: PostgreSQL
  • posix: Posix
  • simplexml: SimpleXML
  • mysqli: MySQLi
  • xmlreader: XMLReader
  • xmlwriter: XMLWriter
  • fileinfo: fileinfo

This build was largely based on the Alpine build with the goal of creating drop-in replacements to Alpine PHP images.

Paths Change

Bin paths changed slightly so I created an alias to not break current images that set /bin/php as entry point.

@erikaheidi erikaheidi requested a review from a team as a code owner June 29, 2023 14:23
@erikaheidi erikaheidi requested review from deitch and joshrwolf June 29, 2023 14:23
@erikaheidi erikaheidi marked this pull request as draft June 29, 2023 14:25
@erikaheidi erikaheidi marked this pull request as ready for review June 29, 2023 15:13
@imjasonh imjasonh added this pull request to the merge queue Jun 29, 2023
Merged via the queue into wolfi-dev:main with commit 317e78d Jun 29, 2023
@ajayk ajayk mentioned this pull request Jul 2, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants