WordPress-cli Sage development environment using Docker, composer, yarn, webpack and ssh service
899
Docker image with wp-cli, Sage development environment (npm, nodejs, composer, yarn, webpack) and ssh service.
The image is based on the official wordpress-cli:latest.
The basic idea of this image is to attach to existing wordpress stack based on official wordpress:latest image.
This image variant does not contain WordPress itself, but instead contains WP-CLI.
The simplest way to use it with an existing WordPress container would be something similar to the following:
$ docker run -it --rm \
--volumes-from some-wordpress \
--network container:some-wordpress \
bitroniq/docker-wordpress-cli-sage /bin/bash
$ docker run -d -p 2222:22 --name wordpress-cli-sage \
--volumes-from some-wordpress \
--network container:some-wordpress \
bitroniq/docker-wordpress-cli-sage
Then you can SSH to the container with password: password:
$ ssh -p 2222 www-data@localhost
Instead of SSH you can access directly
$ docker exec -it wordpress-cli-sage /bin/bash
For WP-CLI to interact with a WordPress install, it needs access;
The easiest way to accomplish that wp-config.php does not require changes is to simply join the networking context of the existing and presumably working WordPress container.
There are many other ways to accomplish that, for example using docker-compose.yml.
Please visit the official SAGE repository: https://github.com/roots/sage#theme-installation
wordpress:latest imagecomposer create-project roots/sageyarn start ... Compile assets when file changes are made, start Browsersync sessionyarn build ... Compile and optimize the files in your assets directoryyarn build:production ... Compile assets for productionbash-4.4# yarn build:production
DONE Compiled successfully in 19526ms
Asset Size Chunks Chunk Names
scripts/main_172175dd.js 73.1 kB 0 [emitted] main
scripts/customizer_172175dd.js 746 bytes 1 [emitted] customizer
styles/main_172175dd.css 191 kB 0 [emitted] main
assets.json 161 bytes [emitted]
Done in 24.08s.
Content type
Image
Digest
Size
85.6 MB
Last updated
over 7 years ago
docker pull bitroniq/docker-wordpress-cli-sage