Skip to content

Commit c7aa535

Browse files
ossipovbestlong
authored andcommitted
Added WP-CLI support to workspace (laradock#1748)
* Added WP-CLI support * Updated documentation for WP-CLI
1 parent 5edf3f3 commit c7aa535

4 files changed

Lines changed: 18 additions & 1 deletion

File tree

DOCUMENTATION/content/introduction/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Laradock introduces the **Workspace** Image, as a development environment.
103103
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.
104104

105105
**Workspace Image Tools**
106-
PHP CLI - Composer - Git - Linuxbrew - Node - V8JS - Gulp - SQLite - xDebug - Envoy - Deployer - Vim - Yarn - SOAP - Drush...
106+
PHP CLI - Composer - Git - Linuxbrew - Node - V8JS - Gulp - SQLite - xDebug - Envoy - Deployer - Vim - Yarn - SOAP - Drush - WP-CLI...
107107

108108
You can choose, which tools to install in your workspace container and other containers, from the `.env` file.
109109

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ services:
7171
- INSTALL_NPM_BOWER=${WORKSPACE_INSTALL_NPM_BOWER}
7272
- INSTALL_NPM_VUE_CLI=${WORKSPACE_INSTALL_NPM_VUE_CLI}
7373
- INSTALL_DRUSH=${WORKSPACE_INSTALL_DRUSH}
74+
- INSTALL_WP_CLI=${WORKSPACE_INSTALL_WP_CLI}
7475
- INSTALL_DRUPAL_CONSOLE=${WORKSPACE_INSTALL_DRUPAL_CONSOLE}
7576
- INSTALL_AEROSPIKE=${WORKSPACE_INSTALL_AEROSPIKE}
7677
- AEROSPIKE_PHP_REPOSITORY=${AEROSPIKE_PHP_REPOSITORY}

env-example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ WORKSPACE_INSTALL_MSSQL=false
104104
WORKSPACE_INSTALL_DRUSH=false
105105
WORKSPACE_DRUSH_VERSION=8.1.17
106106
WORKSPACE_INSTALL_DRUPAL_CONSOLE=false
107+
WORKSPACE_INSTALL_WP_CLI=false
107108
WORKSPACE_INSTALL_AEROSPIKE=false
108109
WORKSPACE_INSTALL_V8JS=false
109110
WORKSPACE_INSTALL_LARAVEL_ENVOY=false

workspace/Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,21 @@ RUN if [ ${INSTALL_DRUSH} = true ]; then \
174174
drush core-status \
175175
;fi
176176

177+
###########################################################################
178+
# WP CLI:
179+
###########################################################################
180+
181+
# The command line interface for WordPress
182+
183+
USER root
184+
185+
ARG INSTALL_WP_CLI=false
186+
187+
RUN if [ ${INSTALL_WP_CLI} = true ]; then \
188+
curl -fsSL -o /usr/local/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | bash && \
189+
chmod +x /usr/local/bin/wp \
190+
;fi
191+
177192
###########################################################################
178193
# SSH2:
179194
###########################################################################

0 commit comments

Comments
 (0)