wplib / wp-cli-docker

WP-CLI container for WPLib Box

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wp-cli 1.0.x wp-cli 1.1.x wp-cli 1.2.x wp-cli 1.3.x wp-cli 1.4.x wp-cli 1.5.x

WPLib-Box

WP-CLI Docker Container for WPLib Box

This is the repository for the WP-CLI Docker container implemented for WPLib-Box. It currently provides versions 1.0.x 1.1.x 1.2.x 1.3.x 1.4.x 1.5.x

Supported tags and respective Dockerfiles

1.5.1, 1.5, latest (1.5.1/Dockerfile)

1.4.1, 1.4 (1.4.1/Dockerfile)

1.3.0, 1.3 (1.3.0/Dockerfile)

1.2.1, 1.2 (1.2.1/Dockerfile)

1.1.0, 1.1 (1.1.0/Dockerfile)

1.0.0, 1.0 (1.0.0/Dockerfile)

Using this container.

If you want to use this container as part of WPLib, then use the Docker Hub method. Or you can use the GitHub method to build and run the container.

Using it from Docker Hub

Links

(Docker Hub repo)[https://hub.docker.com/r/wplib/wp-cli/]

(Docker Cloud repo)[https://cloud.docker.com/swarm/wplib/repository/docker/wplib/wp-cli/]

Setup from Docker Hub

A simple docker pull wplib/wp-cli will pull down the latest version.

Runtime from Docker Hub

start - Spin up a Docker container with the correct runtime configs.

docker run -d --name wplib_wp-cli_1.2.1 --restart unless-stopped --network wplibbox --mount type=bind,source=/var/www,target=/var/www wplib/wp-cli:1.2.1

stop - Stop a Docker container.

docker stop wplib_wp-cli_1.2.1

run - Run a Docker container in the foreground, (all STDOUT and STDERR will go to console). The Container be removed on termination.

docker run --rm --name wplib_wp-cli_1.2.1 --network wplibbox --mount type=bind,source=/var/www,target=/var/www wplib/wp-cli:1.2.1

shell - Run a shell, (/bin/bash), within a Docker container.

docker run --rm --name wplib_wp-cli_1.2.1 -i -t --network wplibbox --mount type=bind,source=/var/www,target=/var/www wplib/wp-cli:1.2.1 /bin/bash

rm - Remove the Docker container.

docker container rm wplib_wp-cli_1.2.1

Using it from GitHub repo

Setup from GitHub repo

Simply clone this repository to your local machine

git clone https://github.com/wplib/wp-cli-docker.git

Additional notes:

Running wp-cli within a Docker container relies on the scripts in (here) to be placed under the /usr/local/bin directory of the Vagrant host. This will be performed automatically for you when using this as part of WPLib-Box.

Building from GitHub repo

make build - Build Docker images. Build all versions from the base directory or specific versions from each directory.

make list - List already built Docker images. List all versions from the base directory or specific versions from each directory.

make clean - Remove already built Docker images. Remove all versions from the base directory or specific versions from each directory.

make push - Push already built Docker images to Docker Hub, (only for WPLib admins). Push all versions from the base directory or specific versions from each directory.

Runtime from GitHub repo

When you cd into a version directory you can also perform a few more actions.

make start - Spin up a Docker container with the correct runtime configs.

make stop - Stop a Docker container.

make run - Run a Docker container in the foreground, (all STDOUT and STDERR will go to console). The Container be removed on termination.

make shell - Run a shell, (/bin/bash), within a Docker container.

make rm - Remove the Docker container.

make test - Will issue a stop, rm, clean, build, create and start on a Docker container.

About

WP-CLI container for WPLib Box


Languages

Language:Makefile 95.7%Language:Shell 4.3%