Skip to content

Docker container that builds PHP packages for use in CircleCI

License

Notifications You must be signed in to change notification settings

SmoshySmosh/circleci-php-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CircleCI PHP Builder

This docker container will allow you to build PHP packages that you can install via your circle.yml.

Usage

You may either build this package locally or pull it from docker hub.

To build and use the container, simply run the following commands:

$ docker build -t circleci-php-builder .
$ docker run -e "PHP_VERSION=7.1.0" --rm -v $(pwd):/home/ubuntu/build circleci-php-builder

To use the docker hub version simply download the container from docker hub and run it using the following commands:

$ docker pull smoshysmosh/circleci-php-builder
$ docker run -e "PHP_VERSION=7.1.0" --rm -v $(pwd):/home/ubuntu/build smoshysmosh/circleci-php-builder

Running these commands should output the following file for you to upload to your web server: circleci-phpenv-php-7.1.0-amd64.deb

Notes

  • If you dont pass a PHP_VERSION, the container will default to 7.1.0.
  • You will need to host the file on a public web server.
  • Only versions of PHP that phpenv supports may be built.
  • Currently only works for CircleCI 14.04 Build Containers.

CircleCI Setup

After you have the package that is generated from the command above and have uploaded it to a public web server, installation is pretty simple. Simply add this to your circle.yml file:

machine:
    pre:
        - curl -sSL -O https://<web-host>/circleci-phpenv-php-7.1.0-amd64.deb && sudo dpkg -i circleci-phpenv-php-7.1.0-amd64.deb
    php:
        version: 7.1.0

Support

If you come across any issues or you have any questions, please file a github issue.

About

Docker container that builds PHP packages for use in CircleCI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages