Created
November 21, 2023 16:18
-
-
Save runcom/40e2c02f42c1010d2853b18f9093fe6b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM quay.io/centos-boot/centos-tier-1-dev:stream9 | |
RUN rpm-ostree install gdm firefox gnome-kiosk-script-session plymouth-system-theme | |
RUN rm -rf /var/lib/gdm/.config/pulse/default.pa && rm -rf /var/lib/xkb/README.compiled | |
RUN echo -e "\ | |
#Enable autologin for the user core \n\ | |
# GDM configuration storage \n\ | |
[daemon] \n\ | |
# Uncomment the line below to force the login screen to use Xorg \n\ | |
#WaylandEnable=false \n\ | |
AutomaticLogin=core \n\ | |
AutomaticLoginEnable=True \n\ | |
[security] \n\ | |
[xdmcp] \n\ | |
[chooser] \n\ | |
[debug] \n\ | |
# Uncomment the line below to turn on debugging \n\ | |
Enable=true \n\ | |
" > /etc/gdm/custom.conf | |
RUN echo -e "\ | |
u core 1042 "kiosk user" /var/lib/corehome /bin/sh \n\ | |
" > /usr/lib/sysusers.d/core.conf | |
RUN echo -e "\ | |
#!/bin/sh \n\ | |
while true; do \n\ | |
firefox --profile /var/lib/corehome -kiosk https://time.gov \n\ | |
done \n\ | |
" > /usr/lib/gnome-kiosk-script | |
RUN chown 1042:1042 /usr/lib/gnome-kiosk-script | |
RUN echo -e "\ | |
[User] \n\ | |
Session=gnome-kiosk-script \n\ | |
SystemAccount=false \n\ | |
" > /usr/lib/core-gdm | |
RUN chmod 0600 /usr/lib/core-gdm | |
RUN echo -e "\ | |
C /var/lib/AccountsService/users/core - - - - /usr/lib/core-gdm \n\ | |
d /var/lib/corehome - 1042 1042 - - \n\ | |
d /var/lib/corehome/.local - 1042 1042 - - \n\ | |
d /var/lib/corehome/.local/bin - 1042 1042 - - \n\ | |
C /var/lib/corehome/.local/bin/gnome-kiosk-script - 1042 1042 - /usr/lib/gnome-kiosk-script \n\ | |
" > /usr/lib/tmpfiles.d/core-kiosk.conf | |
RUN systemctl set-default graphical.target && ostree container commit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment