Sign inSign up

nubs/composer-onbuild

By nubs

Updated almost 8 years ago

Image
0

1.1K

nubs/composer-onbuild repository overview

docker-composer-onbuild

This is a base image for building PHP composer packages that execute simple applications ONBUILD.

Purpose

This docker image builds on top of the composer-build image, but adds ONBUILD instructions to install the project code into the container and execute composer install. It also sets the default command to the potentially-useful composer start (this depends on having a start script setup in your composer.json).

Usage

This library is useful with a simple composer.json and Dockerfile. For example, using the Dockerfile:

FROM nubs/composer-onbuild:latest

you can build an image with dependencies installed like so:

docker build --tag my-image .

To execute the default command (composer start), you can simply:

docker run -it --rm my-image

Other commands can also be executed. For example, to run phpunit (assuming it is installed via composer):

docker run -it --rm my-image phpunit

License

docker-composer-onbuild is licensed under the MIT license. See LICENSE for the full license text.

Tag summary

Content type

Image

Digest

sha256:71fa1992d

Size

37.4 MB

Last updated

almost 8 years ago

docker pull nubs/composer-onbuild