This is a basic example of a shrun setup. It provides a bare-bones command line tool testshrun, and a set of corresponding shrun specs which test that tool.
Note: for many users
sudowill be necessary to run shrun commands as it relies on Docker which tends to be installed as root.
clone
git clone git@github.com:rylandg/shrun-basic-demo.git
cd shrun-basic-demoinstall dependency (shrun)
npm install
#or
yarn installbuild demo docker image
npm run buildor with sudo
sudo npm run buildThis will create a docker image that contains the basic testshrun command line tool.
If you're interested in using alpine instead of ubuntu, run:
sudo npm run build-alpinerun shrun
npm run specor with sudo
sudo -E npm run spec-
A very minimal command line tool (named
testshrun). This tool makes it possible to write customshruntest specs. -
Two package.json commands (
build&&spec) which simplify the process of building the default shrun image, and running tests. -
A
specs/demo.ymlspec test file which showcases the basic functionality of shrun.
If you're interested in looking at the default shrun docker files, they are available here. Feel free to copy it locally and modify it to fit your needs.