initial commit
This commit is contained in:
17
docker/Dockerfile.arch
Normal file
17
docker/Dockerfile.arch
Normal file
@@ -0,0 +1,17 @@
|
||||
FROM archlinux/archlinux:base-devel
|
||||
|
||||
COPY scripts/entrypoint.sh /scripts/entrypoint.sh
|
||||
COPY scripts/testing.arch.sh /scripts/testing.sh
|
||||
|
||||
RUN sed -i '1iServer = https://mirror.sanin.dev/arch-linux/\$repo/os/\$arch' /etc/pacman.d/mirrorlist && \
|
||||
pacman -Syu --noconfirm git clang sudo devtools vim bash-completion && \
|
||||
chmod +x /scripts/* && \
|
||||
useradd -m user && \
|
||||
echo "user:pass-$RANDOM" | chpasswd && \
|
||||
echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
|
||||
|
||||
USER user
|
||||
|
||||
WORKDIR /home/user/
|
||||
|
||||
CMD [ "/scripts/entrypoint.sh" ]
|
19
docker/Dockerfile.artix
Normal file
19
docker/Dockerfile.artix
Normal file
@@ -0,0 +1,19 @@
|
||||
FROM artixlinux/artixlinux:base-devel
|
||||
|
||||
COPY scripts/entrypoint.sh /scripts/entrypoint.sh
|
||||
COPY scripts/testing.artix.sh /scripts/testing.sh
|
||||
|
||||
ARG MIRROR=https://mirror.sanin.dev/artix-linux/\$repo/os/\$arch
|
||||
|
||||
RUN sed -i '1iServer = $MIRROR' /etc/pacman.d/mirrorlist && \
|
||||
pacman -Syu --noconfirm git clang sudo vim glibc openssh bash-completion && \
|
||||
chmod +x /scripts/* && \
|
||||
useradd -m user && \
|
||||
echo "user:pass-$RANDOM" | chpasswd && \
|
||||
echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
|
||||
|
||||
USER user
|
||||
|
||||
WORKDIR /home/user/
|
||||
|
||||
CMD [ "/bin/bash" ]
|
21
docker/scripts/entrypoint.sh
Executable file
21
docker/scripts/entrypoint.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -n "$DEP" ]
|
||||
then
|
||||
if [ "$DEP" = "testing" ]
|
||||
then
|
||||
/scripts/testing.sh
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$REPO" ]
|
||||
then
|
||||
/bin/bash
|
||||
exit $?;
|
||||
fi
|
||||
|
||||
# Clone the git repo
|
||||
git clone "$REPO" /home/user/pkg
|
||||
cd /home/user/pkg
|
||||
makepkg -smf --noconfirm --noprogressbar --skippgpcheck --noarchive
|
||||
exit $?;
|
13
docker/scripts/testing.arch.sh
Executable file
13
docker/scripts/testing.arch.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Enable the [core-testing] repository by uncommenting the relevant lines in the configuration file
|
||||
sudo sed -i 's/^#\[core-testing\]/\[core-testing\]/' /etc/pacman.conf
|
||||
|
||||
# Enable the [extra-testing] repository by uncommenting the relevant lines in the configuration file
|
||||
sudo sed -i 's/^#\[extra-testing\]/\[extra-testing\]/' /etc/pacman.conf
|
||||
|
||||
# Uncomment the 'Include = /etc/pacman.d/mirrorlist' line in the configuration file if necessary
|
||||
sudo sed -i '/testing\]/{n;s/^#//}' /etc/pacman.conf
|
||||
|
||||
# Update the package list and upgrade the system
|
||||
sudo pacman -Syu
|
0
docker/scripts/testing.artix.sh
Executable file
0
docker/scripts/testing.artix.sh
Executable file
Reference in New Issue
Block a user