webbuild is a docker container that runs your frontend build tasks. It
was designed to have them running in a clean predefined environment yet
The container can be used using briefbote/webbuild
There are four flavors of this container:
- PHP 5.6
- PHP 7.0
- PHP 7.1
- PHP 7.2
You can use specific php versions by using them as a tag:
docker run briefbote/webbuild:70 for PHP7.0 for example.
latest tag points to the PHP7.2 version
/src containing the source code and
/app containing the release after all build steps have run.
Git is installed within the container.
The package build-essential is installed within the container.
Note about php-55
This container will not be updated automatically as support for PHP 5.5 has been retired. Version 5.6 will get security updates until 12/31/2018.
NODEJS will be installed using nvm. It is respecting .nvmrc. After that, grunt, gulp and bower are installed
You can disable build tools ( installation and run ). Also it is possible to set a custom base directory. From a docker perspective you can inherit from this image and customize the resulting image with a pre- and postbuild script.
See https://github.com/sascha-andres/webbuild/wiki/Customization for more information.
$BASEDIR/.webbuild/prebuild.shif it exists
$BASEDIR/.webbuild/variables.shif it exists
nvm install 4or
nvm installin .webbuild/ is .nvmrc exists there if using node
composerwithout dev dependencies if
$BASE/.webbuild/custom.shif it exists
- task if
$BASE/.webbuild/postbuild.shif it exists
Non zero exit codes will be returned when one of the build steps are failing or
/app is empty after step 14.
Assume you want to build a web application in the current directory containing the sources within the
and you want to place the build in the
Then you can run the build like this:
docker run -t briefbote/webbuild:latest -v $PWD/src:/src -v $PWD/app:/app
A very simplistic sample of it is in the
samples/simple subfolder of this repository (note that
test/app/ is in the
To run the sample change to the test directory and run
run.sh. It (re)creates the app subfolder ands starts a build
that actually does nothing more then to copy the
index.html using a custom.sh into the
Code is open source under the Apache 2.0 License. You can obtain it at https://github.com/sascha-andres/webbuild
If you want to contribute feel free to open an issue
History is now edited on GitHub WIKI: https://github.com/sascha-andres/webbuild/wiki/History