Compare commits
2 Commits
1db47048a1
...
336186d626
Author | SHA1 | Date | |
---|---|---|---|
336186d626 | |||
22362a3937 |
@ -1,4 +1,4 @@
|
|||||||
# OSIC Stacks - osicstack-base-arch
|
# OSIC Stacks - osicstacks-base-arch
|
||||||
# Base image for OSIC Stacks
|
# Base image for OSIC Stacks
|
||||||
FROM greyltc/archlinux-aur:paru
|
FROM greyltc/archlinux-aur:paru
|
||||||
|
|
||||||
@ -27,8 +27,8 @@ ENV USER designer
|
|||||||
|
|
||||||
# Add scripts
|
# Add scripts
|
||||||
RUN mkdir -p .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}"
|
ENV PATH="/home/designer/.scripts:${PATH}"
|
||||||
|
|
||||||
# Initialize the enviroment keeping container alive
|
# Initialize the enviroment keeping container alive
|
||||||
CMD ["sleep", "infinity"]
|
CMD ["sleep", "infinity"]
|
||||||
|
@ -9,23 +9,28 @@ RUN sudo pacman -Syuq --noconfirm
|
|||||||
RUN paru -S --noconfirm kasmvncserver-bin
|
RUN paru -S --noconfirm kasmvncserver-bin
|
||||||
|
|
||||||
# KASM requires the hostname binary to start
|
# 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
|
# KASM requires the "snakeoil" certificate key for SSL authentication
|
||||||
# This key comes from default in debian based distributions
|
# This key comes from default in debian based distributions
|
||||||
# For archlinux this will need to be created manually
|
# For archlinux this will need to be created manually
|
||||||
WORKDIR /etc/ssl
|
WORKDIR /etc/ssl
|
||||||
RUN sudo openssl genpkey -algorithm RSA -out private/ssl-cert-snakeoil.key
|
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 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 640 private/ssl-cert-snakeoil.key
|
||||||
RUN sudo chmod 644 certs/ssl-cert-snakeoil.pem
|
RUN sudo chmod 644 certs/ssl-cert-snakeoil.pem
|
||||||
RUN sudo usermod -aG root designer
|
RUN sudo usermod -aG root designer
|
||||||
|
|
||||||
# Set desktop wallpaper
|
# Install XFCE
|
||||||
RUN mkdir /home/designer/.media
|
RUN sudo pacman -S --noconfirm xorg xfce4
|
||||||
COPY media/defaultwallpaper.png /home/designer/.media
|
|
||||||
RUN setwallpaper /home/designer/.media/defaultwallpaper.png
|
|
||||||
|
|
||||||
# Run VNC server & desktop environment
|
# Copy includes
|
||||||
CMD["vncserver", "-select-de", "xfce"]
|
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"]
|
4
include/desktopinit.desktop
Normal file
4
include/desktopinit.desktop
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=OSICStacks-DesktopInit
|
||||||
|
Exec=sh -c "sleep 1 && desktopinit"
|
Before Width: | Height: | Size: 744 KiB After Width: | Height: | Size: 744 KiB |
2
scripts/desktopinit
Normal file
2
scripts/desktopinit
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
setwallpaper /home/designer/.media/defaultwallpaper.png
|
16
scripts/startserver
Normal file
16
scripts/startserver
Normal 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
|
Loading…
Reference in New Issue
Block a user