osic-stacks/base/web.Dockerfile

39 lines
1.4 KiB
Docker
Raw Normal View History

# OSIC Stacks - osicstacks-base-web
2023-09-19 22:06:13 +00:00
# Base image for OSIC Stacks
ARG BASE_IMG=osicstacks-base-desktop
FROM $BASE_IMG as osicstacks-base-web
2023-09-19 22:06:13 +00:00
# Update packages
RUN sudo pacman -Syuq --noconfirm
# Install KASM VNC server
RUN paru -S --noconfirm kasmvncserver-bin
2023-09-25 22:49:37 +00:00
ENV DISPLAY=:1
2023-09-19 22:06:13 +00:00
# KASM requires the hostname binary to start
2023-09-21 05:15:01 +00:00
RUN sudo pacman -S --noconfirm inetutils
2023-09-19 22:06:13 +00:00
# KASM requires the "snakeoil" certificate key for SSL authentication
# This key comes from default in debian based distributions
# For archlinux this will need to be created manually
WORKDIR /etc/ssl
RUN sudo openssl genpkey -algorithm RSA -out private/ssl-cert-snakeoil.key
2023-09-21 05:15:01 +00:00
RUN sudo openssl req -new -key private/ssl-cert-snakeoil.key -out certs/ssl-cert-snakeoil.csr -subj "/CN=localhost"
2023-09-19 22:06:13 +00:00
RUN sudo openssl x509 -req -days 365 -in certs/ssl-cert-snakeoil.csr -signkey private/ssl-cert-snakeoil.key -out certs/ssl-cert-snakeoil.pem
RUN sudo chmod 640 private/ssl-cert-snakeoil.key
RUN sudo chmod 644 certs/ssl-cert-snakeoil.pem
RUN sudo usermod -aG root designer
2023-09-21 05:15:01 +00:00
# Install XFCE
RUN sudo pacman -S --noconfirm xorg xfce4
2023-09-19 22:06:13 +00:00
2023-09-21 05:15:01 +00:00
# Copy includes
RUN mkdir -p /home/designer/.media
COPY --chown=designer:designer include/media/* /home/designer/.media
RUN mkdir -p /home/designer/.config/autostart
COPY --chown=designer:designer include/desktopinit.desktop /home/designer/.config/autostart
# Start VNC & desktop environment
WORKDIR /home/designer
ENTRYPOINT ["startserver"]