The Dockerfile uses the Schematron skeleton to build an XSLT 2.0 file from an input Schematron file.
The Docker container runs an Apache web server listening on port 80, hosting a set of PHP endpoints that validate an input XML file against the appropriate JATS DTD, format the XML, and/or validate the XML against the Schematron rules using SaxonProcessor
.
docker build . --tag jats-validator --no-cache
docker run --rm --p 4000:80 jats-validator
This is currently a somewhat minimal manual step, automation does need to be bought into it at somepoint but that should also align with improving the automated testing of the container.
Edit the 'Docker File', and update the value of SCHEMATRONS_COMMIT to the commit ref of the schematron files you want to use.
Build the container locally, and ensure that it works...
docker build . --tag jats-validator --no-cache
docker run --rm --p 4000:80 jats-validator
If everything is OK, commit the changes using the following as a template for the commit message.
fix: update to latest version of elife's schematron files
Updated to revision 6f9a349e90a379037fa7086fa5c3cb1cc770c6c8
Push the changes to remote
Note here, that we need to push to 2 branches. Publishing to DockerHub only happens from the 'develop' branch, but it's good practice to ensure that all fixes are also on master.
git push origin master
git checkout develop
git cherry-pick <commit ref of update on master>
git push origin develop
Once the new container has been published, you can updated the deployement on Kubernetes via the jats-validator-docker-formula project.