This repository was archived by the owner on Jul 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.template
More file actions
51 lines (42 loc) · 2.56 KB
/
Dockerfile.template
File metadata and controls
51 lines (42 loc) · 2.56 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
FROM unknownjustuser/arch:base-devel-2024.04
ADD TEMPLATE_ROOTFS_FILE /
LABEL maintainer="unknownjustuser <unknown.just.user@proton.me>"
SHELL ["/bin/bash", "-exo", "pipefail", "-c"]
ENV PATH="/home/builder/bin:/home/builder/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/core_perl:$PATH"
ENV TERM=dumb
RUN sed -i "s/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g" /etc/locale.gen && \
locale-gen && \
echo "LANG=en_US.UTF-8" > /etc/locale.conf && \
echo "KEYMAP=us" > /etc/vconsole.conf
# Configure environment
RUN pacman-key --init && \
pacman -Syy && \
pacman-key --keyserver hkp://keyserver.ubuntu.com:80 --recv-key 3056513887B78AEB && \
pacman-key --lsign-key 3056513887B78AEB && \
pacman --noconfirm -U 'https://geo-mirror.chaotic.cx/chaotic-aur/chaotic-'{keyring,mirrorlist}'.pkg.tar.zst' && \
echo "[multilib]" >>/etc/pacman.conf && echo "Include = /etc/pacman.d/mirrorlist" >>/etc/pacman.conf && \
echo -e "\\n[chaotic-aur]\\nInclude = /etc/pacman.d/chaotic-mirrorlist" >>/etc/pacman.conf && \
echo "" >>/etc/pacman.conf
RUN pacman -Syy --noconfirm --needed --noprogressbar wget bash && \
bash <(wget -qO- https://blackarch.org/strap.sh) && \
pacman -Syyu --noconfirm --needed --noprogressbar
RUN pacman -Sy --noprogressbar --noconfirm yay archiso audit aurutils autoconf base base-devel cmake curl devtools docker docker-buildx docker-compose fakeroot glibc-locales gnupg grep gzip jq less make man namcap openssh openssl parallel pkgconf python python-apprise python-pip rsync squashfs-tools tar unzip vim wget yq zip paru reflector git-lfs openssh git namcap audit grep diffutils parallel cronie
RUN useradd -m -d /home/builder -s /bin/bash -G wheel builder && \
sed -i 's/^# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/g' /etc/sudoers && \
echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
echo "root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
chown -R builder:builder /home/builder && \
chmod g+ws /home/builder && \
setfacl -m u::rwx,g::rwx /home/builder && \
setfacl -d --set u::rwx,g::rwx,o::- /home/builder && \
usermod -a -G docker builder && \
systemctl enable docker
RUN sudo -u builder mkdir /home/builder/bin
RUN sudo -u builder mkdir -p /home/builder/.local/bin
RUN sudo -u builder touch /home/builder/.gitconfig
RUN sudo -u builder mkdir -p /home/builder/.ssh
RUN sudo -u builder touch /home/builder/.ssh/config
RUN sudo -u builder touch /home/builder/.ssh/known_hosts
RUN sudo -u builder ssh-keyscan github.com >/home/builder/.ssh/known_hosts
# USER builder
# WORKDIR /home/builder