diff --git a/archplasma/Dockerfile b/archplasma/Dockerfile index aa62c3c..f5d072c 100644 --- a/archplasma/Dockerfile +++ b/archplasma/Dockerfile @@ -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 \ No newline at end of file +WORKDIR /home/user +ENV HOME=/home/user +ENV DISPLAY=:0 +ENV SHELL=/usr/bin/bash +ENV PS1="[\u@\h \W \$?]\$ " + +# Docker entrypoint +ENTRYPOINT ["/entrypoint"] \ No newline at end of file