Skip to content

A small container with latest stable PHP, Git, and Composer

Notifications You must be signed in to change notification settings

shipping-docker/php-composer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 

Repository files navigation

PHP-Composer

This takes the latest stable official PHP Docker images (currently php:7.2-cli, php:7.3-cli, php:7.4-cli), and adds in Git, Composer, Zip, as well as common PHP modules.

This is best used for when you do not have PHP 7+ installed on your machine, and don't want to install it. In such a case, you may run into a chicken and egg issue with Vessel where you cannot start a new Laravel project, nor get Vessel, until you have PHP 7, but you won't have PHP 7 until you install and setup Vessel.

Usage

To create a new Laravel project, or run any Composer command, run the following:

cd ~/Path/To/Projects

# Create a new Laravel app
docker run --rm \
    -v $(pwd):/opt \
    -w /opt \
    shippingdocker/php-composer:latest \
    composer create-project laravel/laravel my-app


# Add Vessel to that new app, or run any composer command
cd ~/Path/To/Projects/my-app

docker run --rm \
    -v $(pwd):/opt \
    -w /opt \
    shippingdocker/php-composer:latest \
    composer require shipping-docker/vessel

You may want to replace $(pwd) with your actual file path if $(pwd) does not correctly expand to your current working directory.

About

A small container with latest stable PHP, Git, and Composer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published