Compare commits

...

2 Commits

Author SHA1 Message Date
336186d626 Base web image working 2023-09-21 02:15:01 -03:00
22362a3937 Fix typo 2023-09-19 19:20:44 -03:00
6 changed files with 38 additions and 11 deletions

View File

@ -1,4 +1,4 @@
# OSIC Stacks - osicstack-base-arch
# OSIC Stacks - osicstacks-base-arch
# Base image for OSIC Stacks
FROM greyltc/archlinux-aur:paru
@ -27,8 +27,8 @@ ENV USER designer
# Add scripts
RUN mkdir -p .scripts
COPY --chown=designer:designer --chmod=755 scripts/klayout /home/designer/.scripts
COPY --chown=designer:designer --chmod=755 scripts/* /home/designer/.scripts
ENV PATH="/home/designer/.scripts:${PATH}"
# Initialize the enviroment keeping container alive
CMD ["sleep", "infinity"]
CMD ["sleep", "infinity"]

View File

@ -9,23 +9,28 @@ RUN sudo pacman -Syuq --noconfirm
RUN paru -S --noconfirm kasmvncserver-bin
# KASM requires the hostname binary to start
RUN pacman -S --noconfirm inetutils
RUN sudo pacman -S --noconfirm inetutils
# 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
RUN sudo openssl req -new -key private/ssl-cert-snakeoil.key -out certs/ssl-cert-snakeoil.csr -subj "CN=localhost"
RUN sudo openssl req -new -key private/ssl-cert-snakeoil.key -out certs/ssl-cert-snakeoil.csr -subj "/CN=localhost"
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
# Set desktop wallpaper
RUN mkdir /home/designer/.media
COPY media/defaultwallpaper.png /home/designer/.media
RUN setwallpaper /home/designer/.media/defaultwallpaper.png
# Install XFCE
RUN sudo pacman -S --noconfirm xorg xfce4
# Run VNC server & desktop environment
CMD["vncserver", "-select-de", "xfce"]
# 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"]

View File

@ -0,0 +1,4 @@
[Desktop Entry]
Type=Application
Name=OSICStacks-DesktopInit
Exec=sh -c "sleep 1 && desktopinit"

View File

Before

Width:  |  Height:  |  Size: 744 KiB

After

Width:  |  Height:  |  Size: 744 KiB

2
scripts/desktopinit Normal file
View File

@ -0,0 +1,2 @@
#!/bin/bash
setwallpaper /home/designer/.media/defaultwallpaper.png

16
scripts/startserver Normal file
View File

@ -0,0 +1,16 @@
#!/bin/bash
cd /home/designer
# Run VNC server
export DISPLAY=:1
eval $(vncserver -dry-run) &
echo -e "password\npassword\n" | vncpasswd -u designer -w -r
# Wait for VNC server to start
sleep 1
# Run desktop environment (XFCE)
xfce4-session --display=$DISPLAY
# Keep container alive
sleep infinity