forked from ublue-os/arch-distrobox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Containerfile
142 lines (134 loc) · 3.96 KB
/
Containerfile
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
FROM quay.io/toolbx/arch-toolbox AS arch-distrobox
# 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-key --init && pacman-key --populate && \
pacman -Syu --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 && \
pacman -S --clean --clean --noconfirm
# Distrobox Integration
RUN git clone https://github.com/89luca89/distrobox.git --single-branch /tmp/distrobox && \
cp /tmp/distrobox/distrobox-host-exec /usr/bin/distrobox-host-exec && \
ln -fs /usr/libexec/flatpak-xdg-utils/flatpak-spawn /usr/bin/ && \
ln -fs /usr/bin/distrobox-host-exec /usr/bin/bootc && \
ln -fs /usr/bin/distrobox-host-exec /usr/bin/docker && \
ln -fs /usr/bin/distrobox-host-exec /usr/bin/flatpak && \
ln -fs /usr/bin/distrobox-host-exec /usr/bin/podman && \
ln -fs /usr/bin/distrobox-host-exec /usr/bin/rpm-ostree && \
wget https://github.com/1player/host-spawn/releases/download/$(cat /tmp/distrobox/distrobox-host-exec | grep host_spawn_version= | cut -d "\"" -f 2)/host-spawn-$(uname -m) -O /usr/bin/host-spawn && \
chmod +x /usr/bin/host-spawn && \
rm -drf /tmp/distrobox
# Install packages Distrobox adds automatically, this speeds up first launch
RUN pacman -S \
adw-gtk-theme \
bash-completion \
bc \
curl \
diffutils \
findutils \
glibc \
gnupg \
go \
inetutils \
keyutils \
less \
lsof \
man-db \
man-pages \
mesa \
mlocate \
mtr \
ncurses \
nss-mdns \
opengl-driver \
openssh \
pigz \
pinentry \
procps-ng \
rsync \
shadow \
sudo \
tcpdump \
time \
traceroute \
tree \
tzdata \
unzip \
util-linux \
util-linux-libs \
vte-common \
wget \
words \
xorg-xauth \
zip \
--noconfirm && \
pacman -S --clean --clean --noconfirm
# bloated stuff gets its own layer
# LC_ALL=C.UTF-8 pacman -Qi | awk '/^Name/{name=$3} /^Installed Size/{print $4$5, name}' | LC_ALL=C.UTF-8 sort -h
RUN pacman -S chromium --noconfirm && pacman -S --clean --clean --noconfirm
RUN pacman -S rclone --noconfirm && pacman -S --clean --clean --noconfirm
RUN pacman -S ffmpeg --noconfirm && pacman -S --clean --clean --noconfirm
RUN pacman -S jdk-openjdk --noconfirm && pacman -S --clean --clean --noconfirm
#RUN pacman -S mpd mpc ncmpcpp pipewire wireplumber --noconfirm
# My Own custom packages I need
RUN pacman -S \
android-tools \
btop \
curl \
dos2unix \
fzf \
git \
htop \
iftop \
lf \
man \
mediainfo \
neovim \
nvtop \
openssl \
p7zip \
qrencode \
rsync \
scrcpy \
shellcheck \
stress \
svn \
tldr \
tmux \
unarchiver \
unrar \
wget \
wl-clipboard \
xorg-xev \
xorg-xkill \
yt-dlp \
zsh \
zsh-autosuggestions \
zsh-completions \
zsh-syntax-highlighting \
--noconfirm && \
pacman -S --clean --clean --noconfirm
# 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 && \
paru -S \
aur/nexusmods-app-bin \
--noconfirm
USER root
WORKDIR /
# Cleanup
RUN sed -i 's@#en_US.UTF-8@en_US.UTF-8@g' /etc/locale.gen && \
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/*"