diff options
author | Javier Cacheiro <javier.cacheiro.lopez@cesga.es> | 2022-04-13 19:33:21 +0200 |
---|---|---|
committer | Javier Cacheiro <javier.cacheiro.lopez@cesga.es> | 2022-04-22 13:21:57 +0200 |
commit | dec26a6a2d3cb44a841ddf2bf60ea3018fa8457c (patch) | |
tree | a77d32d3855a86ced4b70c65a24ecb64cf914b91 /README.md | |
parent | e4cff3746ddb49f7b8fc604f0ac736c2e52cef95 (diff) | |
download | websockify-dec26a6a2d3cb44a841ddf2bf60ea3018fa8457c.tar.gz |
Docker support
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -168,3 +168,36 @@ before running `python3 setup.py install`. Afterwards, websockify should be available in your path. Run `websockify --help` to confirm it's installed correctly. + + +### Running with Docker/Podman +You can also run websockify using Docker, Podman, Singularity, udocker or +your favourite container runtime that support OCI container images. + +The entrypoint of the image is the `run` command. + +To build the image: +``` +cd docker +docker build -t novnc/websockify . +``` + +Once built you can just launch it with the same +arguments you would give to the `run` command and taking care of +assigning the port mappings: +``` +docker run -it --rm -p <port>:<container_port> novnc/websockify <container_port> <run_arguments> +``` + +For example to forward traffic from local port 7000 to 10.1.1.1:5902 +you can use: +``` +docker run -it --rm -p 7000:80 novnc/websockify 80 10.1.1.1:5902 +``` + +If you need to include files, like for example for the `--web` or `--cert` +options you can just mount the required files in the `/data` volume and then +you can reference them in the usual way: +``` +docker run -it --rm -p 443:443 -v websockify-data:/data novnc/websockify --cert /data/self.pem --web /data/noVNC :443 --token-plugin TokenRedis --token-source myredis.local:6379 --ssl-only --ssl-version tlsv1_2 +``` |