forked from vufa/arch-makepkg-action
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
86 lines (71 loc) · 2.08 KB
/
Dockerfile
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
FROM archlinux/archlinux:base-devel
MAINTAINER Vufa <[email protected]>
ENV UGID='2000' UGNAME='build'
RUN pacman -Syy
RUN pacman -Syu --noconfirm
# Add sudoers
RUN echo "build ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/$UGNAME
RUN chmod 'u=r,g=r,o=' /etc/sudoers.d/$UGNAME
RUN \
# Update
pacman-key --init && \
pacman-key --populate archlinux && \
pacman -Syu \
base-devel \
git \
reflector \
rsync \
--noconfirm --need && \
# Clean .pacnew files
find / -name "*.pacnew" -exec rename .pacnew '' '{}' \;
# Setup build user/group
RUN \
groupadd --gid "$UGID" "$UGNAME" && \
useradd --create-home --uid "$UGID" --gid "$UGID" --shell /usr/bin/false "${UGNAME}"
USER $UGNAME
RUN \
sudo reflector --verbose -l 10 \
--sort rate --save /etc/pacman.d/mirrorlist
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/core_perl
# install yay
RUN \
cd /home/$UGNAME && \
curl -O -s https://aur.archlinux.org/cgit/aur.git/snapshot/yay-bin.tar.gz && \
tar xf yay-bin.tar.gz && \
cd yay-bin && makepkg -is --skippgpcheck --noconfirm && cd .. && \
rm -rf yay-bin && rm yay-bin.tar.gz
# Enable multilib repo
RUN sudo sed -i "/\[multilib\]/,/Include/"'s/^#//' /etc/pacman.conf
# install rustdesk dep
RUN yay -S \
llvm \
clang \
libva \
libvdpau \
rust \
gstreamer \
unzip \
git \
cmake \
gcc \
curl \
wget \
nasm \
zip \
make \
pkg-config \
clang \
gtk3 \
xdotool \
libxcb \
libxfixes \
alsa-lib \
pipewire \
python \
ttf-arphic-uming \
libappindicator-gtk3 \
pam \
gst-plugins-base \
gst-plugin-pipewire --noconfirm --needed --useask --gpgflags "--keyserver hkp://pool.sks-keyservers.net"
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]