I have a node.js service which stores access policies that is sent to open policy agent service when application starts. Policies can be testes, but to do so they need to be run in open policy agent environment which is not a part of my service. Is there a way to run these tests when building my node.js service docker image? So the image won't be build unless all the tests pass?
So, the dockerfile could look something like this:
FROM openpolicyagent/opa:latest
CMD ["test"]
# somehow check that all tests pass and if not return an error
FROM node:8
# node-related stuff
Aucun commentaire:
Enregistrer un commentaire