FROM ubuntu:focal

ENV STARTUPDIR=/dockerstartup

ARG KASMVNC_PACKAGE_DIR
COPY $KASMVNC_PACKAGE_DIR/kasmvncserver_*.deb /tmp/
RUN rm -f /tmp/kasmvncserver_*+*.deb; apt-get update && dpkg -i /tmp/*.deb; apt-get -yf install
RUN apt-get update && apt-get -y install xterm lsb-release

RUN mkdir -p $STARTUPDIR
COPY builder/startup/vnc_startup_barebones.sh $STARTUPDIR

RUN useradd -m foo && addgroup foo ssl-cert
USER foo

ENTRYPOINT "/$STARTUPDIR/vnc_startup_barebones.sh"
