-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.archlinux
More file actions
37 lines (29 loc) · 999 Bytes
/
Dockerfile.archlinux
File metadata and controls
37 lines (29 loc) · 999 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM archlinux:base-devel AS dev
RUN pacman -Syu --noconfirm \
&& rm -rf /var/cache/pacman/pkg/*
RUN useradd --create-home makepkg \
&& echo "makepkg ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/makepkg
USER makepkg
RUN curl https://aur.archlinux.org/cgit/aur.git/snapshot/yay.tar.gz | tar -C /home/makepkg -xz \
&& cd /home/makepkg/yay \
&& makepkg -sri --noconfirm \
&& rm -rf /home/makepkg/{*,.cache,.config} \
&& sudo rm -rf /var/cache/pacman/pkg/*
# AUR Packages
RUN yay --noconfirm --removemake -S \
asdf-vm \
&& sudo rm -rf /home/makepkg/{*,.*} \
&& sudo rm -rf /var/cache/pacman/pkg/*
USER root
RUN rm /etc/sudoers.d/makepkg \
&& userdel -r makepkg
# Pacman Packages
RUN pacman -Syu --noconfirm \
git \
zsh \
&& rm -rf /var/cache/pacman/pkg/*
COPY entrypoint.sh /usr/local/bin
COPY entrypoint-user.sh /usr/local/bin
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
ARG SOURCE_HASH
LABEL org.opencontainers.image.devshell.source-hash=$SOURCE_HASH