-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
57 lines (51 loc) · 1.86 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
FROM docker.io/library/archlinux:latest AS arch
# Pacman Initialization
# Create build user
RUN sed -i 's/#Color/Color/g' /etc/pacman.conf && \
printf "[multilib]\nInclude = /etc/pacman.d/mirrorlist\n" | tee -a /etc/pacman.conf && \
sed -i 's/#MAKEFLAGS="-j2"/MAKEFLAGS="-j$(nproc)"/g' /etc/makepkg.conf && \
pacman -Syu --noconfirm && \
pacman -S \
wget \
base-devel \
git \
--noconfirm && \
useradd -m --shell=/bin/bash build && usermod -L build && \
echo "build ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
echo "root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
RUN pacman -Syu \
nano fuse3 \
xorg-server vulkan-tools plasma-desktop xdg-desktop-portal-kde \
plasma-pa kde-gtk-config pkg-config \
firefox konsole dolphin \
flatpak \
steam lutris \
cargo \
--noconfirm
RUN cargo install dcspkg --root /usr
# Add paru and install AUR packages
USER build
WORKDIR /home/build
RUN git clone https://aur.archlinux.org/paru-bin.git --single-branch && \
cd paru-bin && \
makepkg -si --noconfirm && \
cd .. && \
rm -drf paru-bin
RUN paru --noconfirm -S prismlauncher-qt5-bin jre17-openjdk jre21-openjdk
USER root
WORKDIR /
RUN mkdir -p /home/fng
WORKDIR /home/fng
RUN git clone https://github.com/UWCS/fng-home.git .
RUN git clone https://github.com/UWCS/dcslauncher.git
WORKDIR /
# Cleanup
# We do this last because it'll only apply to updates the user makes going forward. We don't want to optimize for the build host's environment.
RUN sed -i 's/-march=x86-64 -mtune=generic/-march=native -mtune=native/g' /etc/makepkg.conf && \
userdel -r build && \
rm -drf /home/build && \
sed -i '/build ALL=(ALL) NOPASSWD: ALL/d' /etc/sudoers && \
sed -i '/root ALL=(ALL) NOPASSWD: ALL/d' /etc/sudoers && \
rm -rf \
/tmp/* \
/var/cache/pacman/pkg/*