Skip to content

An image to build PHP7 applications with grunt task runner

License

Notifications You must be signed in to change notification settings

u-nik/docker-grunt-php-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-grunt-php-builder

Build Status

An image to build PHP (5.6/7.x) applications with the Grunt task runner

Usage

To run the build image, you must have already created a Gruntfile.js in a source directory.

You can create a Bash script for an easier access (PHP 7.0):

#!/usr/bin/env bash

docker run --rm \
    -v $(pwd)/src:/app \
    -v $(pwd)/reports:/reports \
    dockerizr/grunt-php-builder:7.0 "$@"

As you can see, you must define at least one volume to /app on container site, to inject the application source code. The Gruntfile.js file must be located there.

If you want to use an own build image (which will inherit from grunt-php-builder), you can extends the Bash script in this way:

#!/usr/bin/env bash

BUILD_IMAGE="my-grunt-php-builder:7.0"

if [[ "$(docker images -q ${BUILD_IMAGE} 2> /dev/null)" == "" ]]; then
  echo "Build image not found. Building now..."
  docker build -t ${BUILD_IMAGE} path/to/build/context
fi

docker run --rm \
    -v $(pwd)/src:/app \
    -v $(pwd)/reports:/reports \
    ${BUILD_IMAGE} "$@"

About

An image to build PHP7 applications with grunt task runner

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages