Download the PHP package zero-to-prod/dock without Composer
On this page you can find all versions of the php package zero-to-prod/dock. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zero-to-prod/dock
More information about zero-to-prod/dock
Files in zero-to-prod/dock
Package dock
Short Description Docker files for running a basic PHP application.
License MIT
Homepage https://github.com/zero-to-prod/dock
Informations about the package dock
Zerotoprod\Dock
Contents
- Introduction
- Supported Php Versions
- Prerequisites
- Installation
- Documentation Publishing
- Automatic Documentation Publishing
- Initialization
- Usage
- Configuration
- Building Containers
- Install Dependencies for a Runtime
- Commands
Introduction
Dock provides a Docker powered local development experience for a PHP application. Other than Docker, no software or libraries are required to be installed on your local computer before using Dock. Dock's simple CLI means you can start building your PHP application without any previous Docker experience.
Why you’ll love it:
- Test Multiple PHP Versions with one script.
- Switch Versions Easily via
.envsettings.- Comprehensive Docker Support through docker-compose.
- PHP Debugging already setup across all supported versions.
- Available with Composer.
Supported PHP Versions
Compatible with PHP:
- 7.1
- 7.2
- 7.3
- 7.4
- 8.0
- 8.1
- 8.2
- 8.3
- 8.4
- 8.5
Prerequisites
- Docker installed and running
Installation
Add dock to your project with Composer:
Documentation Publishing
You can publish this README to your local documentation directory.
This can be useful for providing documentation for AI agents.
This can be done using the included script:
Automatic Documentation Publishing
You can automatically publish documentation by adding the following to your composer.json:
Initialization
Once you have the composer package installed, you can set up Dock in your project directory:
This copies necessary configuration files to your project.
Usage
Dock includes scripts to build and manage your PHP environments effortlessly.
Configuration
Before starting development, verify that your .env file contains the correct settings.
You can specify which PHP version to use for local development, debugging, and Composer operations by updating these variables in your .env file:
Building Containers
Build Docker containers based on your .env PHP versions:
This will create the following containers:
- php
(example service: php7.1) - debug
(example service: debug7.1) - composer
(example service: composer7.1)
Install Dependencies for a Runtime
Update Composer dependencies as defined in your .env:
Commands
There a few commands that come with the default script.