Update archplasma/Dockerfile

This commit is contained in:
myve 2024-07-21 01:55:48 +00:00
commit 30df9e6621

View file

@ -5,6 +5,9 @@ USER root
# X session environment variable
ENV STARTXBIN=startplasma-x11
# Copy app folder
COPY entrypoint /entrypoint
# Install packages
RUN --mount=type=cache,sharing=locked,target=/var/cache/pacman \
pacman-key --init \
@ -23,16 +26,21 @@ RUN --mount=type=cache,sharing=locked,target=/var/cache/pacman \
&& useradd --create-home --gid users --shell /usr/bin/bash user \
&& echo 'user ALL=(ALL:ALL) NOPASSWD: MISCELLANEOUS, /usr/bin/pacman -S' >/etc/sudoers.d/zz-DOCKER \
&& echo 'Defaults lecture = never' >>/etc/sudoers.d/zz-DOCKER \
&& passwd -l root >/dev/null 2>&1
&& passwd -l root >/dev/null 2>&1 \
&& chown -R user /app
# configure nvidia container runtime
# https://github.com/NVIDIA/nvidia-container-runtime#environment-variables-oci-spec
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
# Tigervnc initialization scripts
COPY *.sh /app/init.d/
# Reset user home directory
ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility
# Default environment
USER user
WORKDIR /home/user
WORKDIR /home/user
ENV HOME=/home/user
ENV DISPLAY=:0
ENV SHELL=/usr/bin/bash
ENV PS1="[\u@\h \W \$?]\$ "
# Docker entrypoint
ENTRYPOINT ["/entrypoint"]