-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·53 lines (42 loc) · 2.44 KB
/
Dockerfile
File metadata and controls
executable file
·53 lines (42 loc) · 2.44 KB
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
FROM archlinux/archlinux:latest
# Initialize keys, update, install base packages
RUN pacman-key --init && \
pacman-key --populate archlinux && \
pacman -Syu --noconfirm && \
pacman -S --noconfirm base-devel git sudo python python-rich python-gitpython archlinux-keyring nano grub archiso
# Configure pacman/makepkg
RUN sed -i '/^#.*\(VerbosePkgLists\|ILoveCandy\)/s/^#//' /etc/pacman.conf && \
echo -e '\n[stratos]\nSigLevel = Optional TrustAll\nServer = http://repo.stratos-linux.org/' >> /etc/pacman.conf && \
sed -i 's/^#*GPGKEY=.*/GPGKEY="19A421C3D15C8B7C672F0FACC4B8A73AB86B9411"/' /etc/makepkg.conf && \
sed -i 's/^#*\(PACKAGER=\).*/\1"StratOS team <stratos-linux@gmail.com>"/' /etc/makepkg.conf && \
sed -i 's/purge debug/purge !debug/g' /etc/makepkg.conf
RUN pacman -Sy --noconfirm
#RUN curl -s "https://archlinux.org/mirrorlist/?country=IN&country=US&country=DE&country=GB&protocol=https&use_mirror_status=on" | sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -n 5 -
RUN export TMPFILE="/tmp/ratemir" && \
pacman -S rate-mirrors-bin --noconfirm && \
touch "$TMPFILE" && \
rate-mirrors --save="$TMPFILE" --allow-root arch --completion=1 --max-delay=43200 && \
mv $TMPFILE /etc/pacman.d/mirrorlist
# Fetch from the updated mirrors
# RUN pacman -Sy python-vdf python-inputs python-steam --noconfirm
# Add third-party keys
RUN pacman-key --keyserver hkps://keyserver.ubuntu.com --recv-keys \
9AE4078033F8024D 647F28654894E3BD457199BE38DBBDC86092693E 17E90D521672C04631B1183EE78DAE0F3115E06B && \
pacman-key --lsign-key 9AE4078033F8024D 647F28654894E3BD457199BE38DBBDC86092693E 17E90D521672C04631B1183EE78DAE0F3115E06B && \
curl -sS https://github.com/elkowar.gpg | gpg --dearmor | pacman-key --add - && \
pacman-key --lsign-key elkowar && \
curl -sS https://github.com/web-flow.gpg | gpg --dearmor | pacman-key --add - && \
pacman-key --lsign-key web-flow
# Create builder user
RUN useradd -m -s /bin/bash builder && \
usermod -aG wheel builder && \
echo '%wheel ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
RUN pacman -Sccc --noconfirm
USER builder
# Receive and trust Elii Zaretskii's keys (Stratmacs)
RUN rm -rf ~/.gnupg && \
mkdir -p ~/.gnupg && chmod 700 ~/.gnupg && \
gpgconf --kill all || true && \
gpg --recv 17E90D521672C04631B1183EE78DAE0F3115E06B && \
echo -e "trust\n5\ny\nquit" | gpg --batch --command-fd 0 --edit-key 17E90D521672C04631B1183EE78DAE0F3115E06B
# WORKDIR /workspace