The result app was years out of date with node and npm packages, and required multiple changes to use the current supported socket.io and postgres db libs. Minimal changes to server.js to support change in pg syntax. A few minor changes to Dockerfile to improve readability, conform to docker best practices, and change to use npm ci to ensure future builds don't break again due to difference between package and package-lock.
To match other .js loading patterns in this repo, don't use a CDN angular, but rather a local copy in case examples are used offline or in large classrooms with slow internet. Also updated to latest angular 1.4
This patch makes some optimizations in the result service's image;
- switch to `node:8.9-alpine`, which a smaller base image
- use `https://` for the registry
- use `COPY` instead of `ADD`, following best pracice
- cleanup npm cache, and combine steps to reduce image size
These changes bring down the image size from 248MB to 81.2MB
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>