A docker image that contains all build tools required for building dm-wordpress images.
Features:
- composer
- nodejs / npm
- yarn
- grunt / grunt-cli
- bower
- sass
- Uniformly use
/data
as the working directory for any of the tools above - Executing as non-privileged user
wp-build
- Preserving file permissions by adopting the
/data
dir owner's UID
docker pull digitalmobil/wp-build-tools
-
Run Composer
Simple composer call in the current directory:
docker run --rm -v $(pwd):/data digitalmobil/wp-build-tools composer --help
If working with packages installed via git ssh the local .ssh directory shall be mapped into the container:
docker run --rm -v $(pwd):/data \ -v ~/.ssh:/home/wp-build/.ssh \ digitalmobil/wp-build-tools composer install
To speed up things the local cache can be utilized as well:
docker run --rm -v $(pwd):/data \ -v ~/.ssh:/home/wp-build/.ssh \ -v ~/.composer:/home/wp-build/.composer \ digitalmobil/wp-build-tools composer install
-
Run npm
docker run --rm -v $(pwd):/data digitalmobil/wp-build-tools npm install
-
Run yarn
docker run --rm -v $(pwd):/data digitalmobil/wp-build-tools yarn install
-
Run grunt
docker run --rm -v $(pwd):/data digitalmobil/wp-build-tools grunt prod