From 6d025db1199ed9c14391a75f1c1ec335f5e1e6ec Mon Sep 17 00:00:00 2001 From: "ryan.kuba" Date: Wed, 29 Jun 2022 12:12:48 -0400 Subject: [PATCH] adding logic to generate certs needed for wizard, minor readme updates --- README.md | 4 ++-- root/etc/cont-init.d/02-setup | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d7bd0ff..45753cf 100644 --- a/README.md +++ b/README.md @@ -50,8 +50,8 @@ docker run -d \ | Parameter | Function | | :----: | --- | -| `-p 443` | Kasm Workspaces web UI | -| `-p 3000` | Kasm Installation and upgrade wizard | +| `-p 443` | Kasm Workspaces web UI (HTTPS) | +| `-p 3000` | Kasm Installation and upgrade wizard (HTTPS) | | `-v /kasm/local/storage:/opt` | Docker and Kasm Storage | | `-e KASM_PORT=443` | If not using port 443 this needs to be set to the port you are binding to (optional) | | `-e DOCKER_HUB_USERNAME=USER` | Dockerhub username for logging in on init (optional) | diff --git a/root/etc/cont-init.d/02-setup b/root/etc/cont-init.d/02-setup index 0a5e956..4c8ed07 100644 --- a/root/etc/cont-init.d/02-setup +++ b/root/etc/cont-init.d/02-setup @@ -9,3 +9,9 @@ fi if [ ! -z "${DOCKER_HUB_USERNAME}" ]; then docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD fi + +# Setup wizard certs if needed +if [ ! -f "/opt/kasm/certs/kasm_wizard.crt" ]; then + mkdir -p /opt/kasm/certs + openssl req -x509 -nodes -days 1825 -newkey rsa:2048 -keyout /opt/kasm/certs/kasm_wizard.key -out /opt/kasm/certs/kasm_wizard.crt -subj "/C=US/ST=VA/L=None/O=None/OU=DoFu/CN=$(hostname)/emailAddress=none@none.none" +fi