FROM --platform=linux/amd64 x11web
MAINTAINER Stefano Alberto Russo <stefano.russo@inaf.it>

# Switch to root
USER root

# Install fluxbox
RUN apt-get install fluxbox -y

# Add fluxbox customisations
COPY files/dot_fluxbox /metauser_home_vanilla/.fluxbox
RUN chown -R metauser:metauser /metauser_home_vanilla/.fluxbox
COPY files/background.jpg /usr/share/images/fluxbox/background.jpg

#------------------------
# Post-intall
#------------------------

# Fix home permissions
RUN chmod 777 /home

# Set entrypoint commands
COPY files/start_fluxbox.sh /usr/bin/start_fluxbox.sh
RUN chmod 755 /usr/bin/start_fluxbox.sh
ENV X11_ENTRYPOINT_COMMAND="/usr/bin/start_fluxbox.sh"

# Set user
USER metauser

# Set container name
ENV CONTAINER_NAME='minimaldesktop'



