Automated build for our wordpress auto-wp images.
894
This repo provides our sources for the creation of a tree-like wordpress image creation process.
To have more management control over our wordpress applications and to reuse specific plugins and settings we are developing some automation for this. In principle there is the following hierachy of images:
In the first layer the basic system with wp-cli and it's version is defined. The second layer defines packages and plugins that are common for every site. The third layer defines application specific packages and plugins. In every layer are version definitions.
To install wordpress into the container with all the needed plugins we fire-up a database container along the build environment which will be thrown away afterwards.
The embedded version gets installed within the image and wordpress does not have any rights in changing it's own files. All plugins and themes have to be defined in the recommended way.
Right now there are three small scripts for the development process:
$ ./build-apache.sh
$ ./run.sh
$ ./stop.sh
With build-apache.sh the wp-base image against php7.1-apache will be build.
The version of wordpress and locale can be changed with environment variables.
Additional plugins can be defined in three ways:
/init/plugins.txt volume/var/www/html/plugins.txt volumeDockerfileExample plugin definition:
RUN printf "active-directory-integration 1.1.8\n" >> /plugins.txt
If you want to use the embedded version with persistent content/media mount the /var/www/html/wp-content/uploads folder. If you mount the wp-content folder you can persist also plugins and themes, though this is discouraged. Instead define plugins and themes in the init script or image definition.
If you want to start with an existing installation of wordpress including an sql dumb:
/var/www/html/init/database.sqlOnly if there is no /var/www/html/wp-config.php the config will be created from the ENV.
Don't forget to set the right ENVs for your new container if you want the config to be created by the init script.
Example container run command (with wp volume and db dump):
$ docker run --name=wp --net runtime -v $PWD/wordpress:/var/www/html -v $PWD/wordpress.sql:/init/database.sql -e WP_PREFIX=wp_custom_ -p 80:80 -d astafulda/wp-base:1.0-apache
Content type
Image
Digest
Size
173 MB
Last updated
about 9 years ago
docker pull astafulda/autowp