I'm trying to create CI process to test WooCommerce plugin. For this I want to create docker images with wordpress installed + configured and woocommerce installed + configured (test product added, etc.). This images will be used in CI: each time we change plugin we create containers (with configured woocommerce) upload our plugin into container and just run our tests.
I create two containers using official docker images wordpress and mysql. Setup everything I need for testing. Then I create images based on this containers. And... I see that images does not store my data because volumes are used in base images (wordpress/mysql). So all changes that were made to my containers (configuration, add test product, etc.) live on host system only not in containers.
The question is: what is the best way to create images with test data on them?
Should I fork mysql/wordpress images and remove 'VOLUME' from Dockerfile? Or maybe I can copy data from volume back do container and update apache/mysql to use new location for data?
Aucun commentaire:
Enregistrer un commentaire