From 5cb5d6f511781f74c6c9aa6e17257ba9e96687f7 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Wed, 16 Oct 2024 19:48:16 +0500 Subject: [PATCH 1/2] Add enterprise-desktop image Introduce a new desktop image wrapping the base image with XFCE, intended to serve as a base for templates using KasmVNC. --- images/desktop/README.md | 15 +++++++++++++++ images/desktop/ubuntu.Dockerfile | 16 ++++++++++++++++ scripts/images.sh | 1 + 3 files changed, 32 insertions(+) create mode 100644 images/desktop/README.md create mode 100644 images/desktop/ubuntu.Dockerfile diff --git a/images/desktop/README.md b/images/desktop/README.md new file mode 100644 index 0000000..35f969b --- /dev/null +++ b/images/desktop/README.md @@ -0,0 +1,15 @@ +# Desktop + +[![DockerPulls](https://img.shields.io/docker/pulls/codercom/enterprise-desktop)](https://hub.docker.com/r/codercom/enterprise-desktop) + +## Description + +Wraps [enterprise-base](../base/README.md) with a xfce desktop environment. + +> **Note:** This image does not contain a vnc-server. +> A VNC server can be added by using the [KasmVNC](https://registry.coder.com/modules/kasmvnc) module. + +## How To Use + +This image is intended to be used as a base image for a templates using the +[KasmVNC](https://registry.coder.com/modules/kasmvnc) module. diff --git a/images/desktop/ubuntu.Dockerfile b/images/desktop/ubuntu.Dockerfile new file mode 100644 index 0000000..203b5a0 --- /dev/null +++ b/images/desktop/ubuntu.Dockerfile @@ -0,0 +1,16 @@ +FROM codercom/enterprise-base:latest + +USER root + +RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ + apt-get install -y --no-install-recommends --no-install-suggests dbus-x11 openssl ssl-cert libdatetime-perl xfce4 xfce4-goodies && \ + rm /run/reboot-required* || true + +# Setting the required environment variables +ARG USER=coder +RUN echo 'LANG=en_US.UTF-8' >> /etc/default/locale; \ + echo 'export GNOME_SHELL_SESSION_MODE=ubuntu' > /home/$USER/.xsessionrc; \ + echo 'export XDG_CURRENT_DESKTOP=xfce' >> /home/$USER/.xsessionrc; \ + echo 'export XDG_SESSION_TYPE=x11' >> /home/$USER/.xsessionrc; + +USER coder \ No newline at end of file diff --git a/scripts/images.sh b/scripts/images.sh index 067bc72..0439477 100644 --- a/scripts/images.sh +++ b/scripts/images.sh @@ -8,4 +8,5 @@ IMAGES=( "golang" "java" "node" + "desktop" ) From c4fc5dd8cdf1656cdb114c9374d1325b80f344a2 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Wed, 16 Oct 2024 20:03:38 +0500 Subject: [PATCH 2/2] Ensure newline at end of Dockerfile --- images/desktop/ubuntu.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/desktop/ubuntu.Dockerfile b/images/desktop/ubuntu.Dockerfile index 203b5a0..6427e5e 100644 --- a/images/desktop/ubuntu.Dockerfile +++ b/images/desktop/ubuntu.Dockerfile @@ -13,4 +13,4 @@ RUN echo 'LANG=en_US.UTF-8' >> /etc/default/locale; \ echo 'export XDG_CURRENT_DESKTOP=xfce' >> /home/$USER/.xsessionrc; \ echo 'export XDG_SESSION_TYPE=x11' >> /home/$USER/.xsessionrc; -USER coder \ No newline at end of file +USER coder