# Dockerfile
FROM node:alpine3.12
RUN apk add --no-cache chromium \
&& yarn add puppeteer-core \
&& apk add \
--no-cache \
--repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
novnc # Dockerfile
FROM node:alpine3.12
RUN apk add --no-cache chromium \
&& yarn add puppeteer-core \
&& apk add \
--no-cache \
--repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
novncIn other words, each chrome process runs in its own user-space (a no-login user which exists only for the duration of the session), which has cpu and memory limits thanks to cgroups, bandwidth limits and restrictions thanks to iptables, and disk and browser cache limits thanks to chrome command-line flags.
edit:
I just got this error trying to build an image. Any idea what's wrong or how to fix it?
ERROR: unsatisfiable constraints:
novnc (missing):
required by: world[novnc]
The command '/bin/sh -c apk add --no-cache chromium && yarn add puppeteer-core && apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/main novnc' returned a non-zero code: 1
I would super like to try this out! :)http://dl-cdn.alpinelinux.org/alpine/edge/testing
Please note I did oversimplify this a bit. You'll still need something like WayVNC, but it doesn't have WebSocket support yet. You can track it here:
https://github.com/any1/neatvnc/issues/2
In the meantime, you should be able to use websockify (there is an alpine package already).
For a simple app, I'd recommend cage which is a kiosk wayland WM for a single app:
https://pkgs.alpinelinux.org/package/edge/community/x86_64/c...
Here is an example for Sway that you could use for Cage as well: