FROM ubuntu:21.04
ENV DEBIAN_FRONTEND noninteractive
ARG TZ=Europe/London
RUN apt update && apt upgrade -y && apt install -y wget xfce4 chromium-browser xrdp sudo
RUN wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg \
	&& install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/ \
	&& sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list' \
	&& rm -f packages.microsoft.gpg
RUN 	apt-get clean && \
        apt-get -y remove && \
        useradd -ms /bin/bash paul && \
        echo 'paul:harry1996' |chpasswd && \
	adduser paul sudo

RUN apt update && apt install -y code dbus-x11
ENTRYPOINT /etc/init.d/xrdp start && tail -F /var/log/xrdp-sesman.log
