alpine/archplasma/Dockerfile

46 lines
1.5 KiB
Text
Raw Normal View History

2024-07-21 01:31:48 +00:00
# syntax = docker/dockerfile:1
2024-07-21 01:26:59 +00:00
FROM quay.io/archlinux/archlinux:base-devel
USER root
# X session environment variable
ENV STARTXBIN=startplasma-x11
2024-07-21 01:55:48 +00:00
# Copy app folder
COPY entrypoint /entrypoint
2024-07-21 01:26:59 +00:00
# Install packages
RUN --mount=type=cache,sharing=locked,target=/var/cache/pacman \
2024-07-21 01:45:08 +00:00
pacman-key --init \
&& sed -i '/ParallelDownloads/c ParallelDownloads = 10' /etc/pacman.conf \
&& pacman -Sy --ask 4 archlinux-keyring \
&& pacman -Su --ask 4 --needed \
sudo bash-completion \
tigervnc \
cuda openssh vim pacman-contrib rsync git \
plasma konsole kate dolphin kompare kcalc \
jack2 ttf-dejavu \
firefox firefox-decentraleyes firefox-ublock-origin \
torbrowser-launcher \
shotwell ffmpegthumbs ark okular \
2024-07-21 01:26:59 +00:00
&& pacman -Scc --ask 4 \
2024-07-21 01:45:08 +00:00
&& 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 \
2024-07-21 01:55:48 +00:00
&& passwd -l root >/dev/null 2>&1 \
&& chown -R user /app
2024-07-21 01:26:59 +00:00
# configure nvidia container runtime
# https://github.com/NVIDIA/nvidia-container-runtime#environment-variables-oci-spec
2024-07-21 01:55:48 +00:00
ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility
# Default environment
2024-07-21 01:26:59 +00:00
USER user
2024-07-21 01:55:48 +00:00
WORKDIR /home/user
ENV HOME=/home/user
ENV DISPLAY=:0
ENV SHELL=/usr/bin/bash
ENV PS1="[\u@\h \W \$?]\$ "
# Docker entrypoint
ENTRYPOINT ["/entrypoint"]