From c7aa535598f7098ab23d741a5baf069f988bb69f Mon Sep 17 00:00:00 2001 From: Dmitry Ossipov Date: Sat, 9 Feb 2019 18:48:28 +0700 Subject: [PATCH] Added WP-CLI support to workspace (#1748) * Added WP-CLI support * Updated documentation for WP-CLI --- DOCUMENTATION/content/introduction/index.md | 2 +- docker-compose.yml | 1 + env-example | 1 + workspace/Dockerfile | 15 +++++++++++++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/DOCUMENTATION/content/introduction/index.md b/DOCUMENTATION/content/introduction/index.md index 6544270..97eb705 100644 --- a/DOCUMENTATION/content/introduction/index.md +++ b/DOCUMENTATION/content/introduction/index.md @@ -103,7 +103,7 @@ Laradock introduces the **Workspace** Image, as a development environment. It contains a rich set of helpful tools, all pre-configured to work and integrate with almost any combination of Containers and tools you may choose. **Workspace Image Tools** -PHP CLI - Composer - Git - Linuxbrew - Node - V8JS - Gulp - SQLite - xDebug - Envoy - Deployer - Vim - Yarn - SOAP - Drush... +PHP CLI - Composer - Git - Linuxbrew - Node - V8JS - Gulp - SQLite - xDebug - Envoy - Deployer - Vim - Yarn - SOAP - Drush - WP-CLI... You can choose, which tools to install in your workspace container and other containers, from the `.env` file. diff --git a/docker-compose.yml b/docker-compose.yml index 99c3650..bac93ac 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -71,6 +71,7 @@ services: - INSTALL_NPM_BOWER=${WORKSPACE_INSTALL_NPM_BOWER} - INSTALL_NPM_VUE_CLI=${WORKSPACE_INSTALL_NPM_VUE_CLI} - INSTALL_DRUSH=${WORKSPACE_INSTALL_DRUSH} + - INSTALL_WP_CLI=${WORKSPACE_INSTALL_WP_CLI} - INSTALL_DRUPAL_CONSOLE=${WORKSPACE_INSTALL_DRUPAL_CONSOLE} - INSTALL_AEROSPIKE=${WORKSPACE_INSTALL_AEROSPIKE} - AEROSPIKE_PHP_REPOSITORY=${AEROSPIKE_PHP_REPOSITORY} diff --git a/env-example b/env-example index e2bd86e..d9a9216 100644 --- a/env-example +++ b/env-example @@ -104,6 +104,7 @@ WORKSPACE_INSTALL_MSSQL=false WORKSPACE_INSTALL_DRUSH=false WORKSPACE_DRUSH_VERSION=8.1.17 WORKSPACE_INSTALL_DRUPAL_CONSOLE=false +WORKSPACE_INSTALL_WP_CLI=false WORKSPACE_INSTALL_AEROSPIKE=false WORKSPACE_INSTALL_V8JS=false WORKSPACE_INSTALL_LARAVEL_ENVOY=false diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 16d07c0..e1af865 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -174,6 +174,21 @@ RUN if [ ${INSTALL_DRUSH} = true ]; then \ drush core-status \ ;fi +########################################################################### +# WP CLI: +########################################################################### + +# The command line interface for WordPress + +USER root + +ARG INSTALL_WP_CLI=false + +RUN if [ ${INSTALL_WP_CLI} = true ]; then \ + curl -fsSL -o /usr/local/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | bash && \ + chmod +x /usr/local/bin/wp \ +;fi + ########################################################################### # SSH2: ###########################################################################