Download the PHP package phpexperts/dockerize without Composer

On this page you can find all versions of the php package phpexperts/dockerize. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dockerize

Dockerize PHP

A utility for rapidly deploying Docker for PHP apps.

Watch the zero-dependency installation video: https://youtu.be/d8o9p2DimME
Installing on a legacy PHP 5.6 app in 2 minutes: https://youtu.be/xZxaJcsbrWU

This project has been tested against over 350,000 open-sourced Packagist packages (via the Bettergist Archiver project) and is compatible with 99.999% of them.

Includes:

The phpexperts/php:VESION-full images contain every bundled PHP extension, and Redis.

The phpexperts/php:VERSION-oracle images contain everything in the full image plus drivers for Oracle (ext-oci8),

If you need an extension that is not available in the full build, please create an Issue at GitHub.

Installation

Via Bash (Zero PHP dependencies)

bash <(curl -s 'https://raw.githubusercontent.com/PHPExpertsInc/dockerize/v10.0/dockerize.sh')

Then edit credentials in .env.

docker compose up -d

Via Composer

# Ensure that vendor/bin is in your PATH and before /usr/bin.
composer require --dev phpexperts/dockerize
vendor/bin/php dockerize
# Edit credentials in .env.
docker-compose up -d

Don't forget to edit your docker-compose.yml!

Configure your PATH

In order to dockerize your existing PHP project, do the following:

Ensure that your profile PATH includes ./vendor/bin and that it takes priority over any other directory that may include a php executable:

PATH=./vendor/bin:$PATH

Thank you, JetBrains

JetBrains generously grants this project a free Open-Source License to PhpStorm and all other JetBrains products as part of its Open Source License initiative.

Advantages over other dockerized PHP projects

  1. Super fast, completely automated installation. (Great for testing multiple versions on CIs)
  2. The BIG difference between www.phpdocker.io and Dockerize PHP is that Dockerize PHP provides all of the client utilities, where phpdocker.io provides NONE of them.

Out of the box, you have per-project binaries:

PHP CI via Docker

With the php-ci.sh shell script, you can easily test your app or library against every major version of PHP (currently 7.4-8.3):

In the project root directory, where your phpunit.xml is, or where you'd normally run phpunit:

vendor/bin/php-ci.sh

It will then automagically update composer and run the appropriate version of PHPUnit for all of the major PHP versions supported by your project via the power of Docker.

Latest Changes

v11.1.0

v11.0.0

v10.0.3

v10.0.2

v10.0.0

v9.2.1

v9.2.0

v9.1.2

v9.1.1

v9.1.0: New zero-dependency Bash Installer

v9.0.1:

v9.0.0: Version 9.0.0: New full PHP image, Oracle ext-oci8, and a new build system.

Manage with docker-compose

To control the containers, use docker-compose.

# Downloads the images, creates and launches the containers.
docker-compose up -d
# View the logs
docker-compose logs -ft
# Stop the containers
docker-compose stop

That's it! You now have the latest LEPP (Linux, Nginx, PostgreSQL, PHP) stack or the latest LEMP (Linux, Nginx, MariaDB, PHP) stack.

User ID control

It is possible to control what UID the initial process (usually PHP) and/or PHP-FPM processes run as. The bin/php file already does this for the initial process.

This is important if you are mounting a volumes into the container, as the the UID of the initial process or PHP-FPM will likely need to match the volume to be able to read and/or write to it.

PHP-FPM process UID

To set the UID for the PHP-FPM process, you should set the PHP_FPM_USER_ID environmental variable on the container. e.g:

docker run -e PHP_FPM_USER_ID=1000 phpexperts/php:7 php-fpm5.6

php.ini directives

You can modify certain php.ini directives by setting environmental variables within the container. The following is a list of environmental variables and the php.ini directives that they correspond to:

environmental variable php.ini directives
PHP_POST_MAX_SIZE post_max_size
PHP_UPLOAD_MAX_FILESIZE upload_max_filesize

e.g. the following will start a PHP container with the post_max_size to 30 Megabytes:

docker run -e PHP_POST_MAX_SIZE=30M phpexperts/php:7

Distribution

Docker Hub:

About PHP Experts, Inc.

PHP Experts, Inc., is my consultation company. It's a small company of a half dozen highly skilled Full Stack PHP devs, including myself, whom I place at 1099 positions at other corporations. We fill both long-term positions and, for crazy devs like me, short-term. If you ever wanted to work on a different project/company every few months or even weeks, anywhere in the continental U.S., Europe, or South East Asia, it's fantastic.

Since 2015, I have set up branches in Las Vegas, Houston, the UK, Dublin, Costa Rica, Colombia, India, and the Philippines. If someone has a work auth in any of those places, we can place you almost anywhere you want. I travel 50% of the time out of choice. All over the world.


All versions of dockerize with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package phpexperts/dockerize contains the following files

Loading the files please wait ....