WP-CLI built on top of Alpine Linux 3.5.
You can use this in two ways, first by using the build script (scripts/run.sh) and the other is the traditional way with the Docker run command.
docker run --rm \
-v $(pwd):/mnt \
obihann/wpcli:1.0.0 \
core download
docker run --rm \
-v $(pwd):/mnt \
obihann/wpcli:1.0.0 \
core config \
--dbhost=db \
--dbname=wptest \
--dbuser=root \
--dbpass=root
docker run --rm \
-v $(pwd):/mnt \
obihann/wpcli:1.0.0 \
core install \
--url=http://wp-test \
--title="Awesome website" \
--admin_user=admin \
--admin_password=admin \
--admin_email [email protected]
By default we download everything to your current directory, this can be updated on the params script (see config section below).
./scripts/run.sh core download
Config assumes that your current directory already has Wordpress core downloaded.
./scripts/run.sh core config \
--dbhost=db \
--dbname=wptest \
--dbuser=root \
--dbpass=root
Config assumes that your current directory already has Wordpress core downloaded AND configured.
./scripts/run.sh core install \
--url=http://wp-test \
--title="Awesome website" \
--admin_user=admin \
--admin_password=admin \
--admin_email [email protected]
Other than Docker iteself no additional tools are required for building. Simply run the build script (./scripts/build.sh) after updating the params (see config section below) or run the traditional Docker command.
docker build -t obihann/wpcli:latest .
You can lint your Dockerfile by either running ./scripts/lint.sh or manually running the projectatomic/dockerfile_lint image.
docker run -it --rm --privileged -v `pwd`:/root/ \
projectatomic/dockerfile-lint \
dockerfile_lint
If you choose to use the run script, make sure to verify the params file.
#!/bin/bash
# executables
DOCKER=/usr/local/bin/docker
GIT=/usr/local/bin/git
# settings
IMAGE_NAME=wpcli
VERSION=1.0.0
HOST_WPPATH="$(pwd)"
CONTAINER_WPPATH=/mnt
This tool is protected by the GNU General Public License v3.
Copyright Jeffrey Hann 2016
Content type
Image
Digest
Size
7.7 MB
Last updated
over 9 years ago
docker pull obihann/wpcli