fix to run npm command in a local container if npm is not available
This builds a image via CI and locally. The image contains required
dependencies to run the npm commands build and start in the container.
reveal.js uses Puppeteer, which requires chrome/chromium.
Chrome/chromium is also the reason for --cap-add=SYS_ADMIN
, otherwise it
will crash. An option would be to use --no-sandbox
, but that needs
patching Puppeteer/reveal.js. Using the container registry requires a
login, when building the image locally we can run ./run-server.sh
and
only needs Docker.
Also replaces deprecated only
keyword with rules
in gitlab ci.