archlinux/firefox/Dockerfile

46 lines
1.3 KiB
Text
Raw Normal View History

2024-07-25 01:33:49 +00:00
# syntax = docker/dockerfile:1
FROM quay.io/archlinux/archlinux:base-devel
2024-07-23 20:11:47 -06:00
USER root
# Build ARG for additional packages to install (eg, openssh)
ARG addpkg
2024-07-23 20:11:47 -06:00
# Build ARG: use "root" for debugging
ARG debug
# Copy mirrorlist
COPY mirrorlist /etc/pacman.d/mirrorlist
# Copy app folder
COPY entrypoint /entrypoint
2024-07-23 20:11:47 -06:00
# Install packages
RUN --mount=type=cache,sharing=locked,target=/var/cache/pacman \
pacman-key --init \
&& sed -i '/ParallelDownloads/c ParallelDownloads = 10' /etc/pacman.conf \
&& pacman -Sy --ask 4 archlinux-keyring \
&& pacman -Su --ask 4 --needed ${addpkg} \
sudo bash bash-completion \
tigervnc \
i3-wm \
ttf-dejavu noto-fonts-cjk \
firefox firefox-decentraleyes firefox-ublock-origin \
&& pacman -Scc --ask 4 \
&& useradd --create-home --gid users --shell /usr/bin/bash user \
&& printf '%s\n' 'user ALL=(ALL:ALL) NOPASSWD: /usr/bin/pacman' \
'Defaults lecture = never' >/etc/sudoers.d/zz-DOCKER \
&& passwd -l root >/dev/null 2>&1
2024-07-23 20:11:47 -06:00
# Default environment
USER ${debug:-user}
WORKDIR /home/user
ENV HOME=/home/user
ENV DISPLAY=:0
ENV SHELL=/usr/bin/bash
ENV PS1="[\u@\h \W \$?]\$ "
# X session environment variable
ENV STARTXBIN=i3
# Docker entrypoint
ENTRYPOINT ["/entrypoint"]