Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Provide a Docker image #321

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open

Provide a Docker image #321

wants to merge 23 commits into from

Conversation

kasparsd
Copy link
Contributor

@kasparsd kasparsd commented May 12, 2020

Fixes #322

Include a Docker container that can be used to run all tasks.

Projects using wp-dev-lib can now use the pre-build Docker image to run all tasks supported by this tool in an environment that includes all the required dependencies and tools:

  • PHP (currently set to 7.4 but could be expanded to 7.2, 7.3 and 7.4 if needed)
  • Node.js
  • Composer
  • WordPress development files with unit test library
  • Xdebug for reporting phpunit coverage
  • and some others.

To use the Docker image, add docker-compose.yml to your project:

version: '3.6'
services:
  wpdevlib:
    image: xwpco/wp-dev-lib:latest
    working_dir: /var/www/html
    volumes:
      - .:/var/www/html

and use the following command to run any composer or npm task in the container:

docker-compose run wpdevlib composer test

where composer test is the task to run, which can potentially call vendor/xwp/wp-dev-lib/scripts/pre-commit to run the dev-lib pre-commit hooks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide an environment for running wp-dev-lib reliably
1 participant