diff --git a/base/Dockerfile b/base/Dockerfile index a7b8227..544ae49 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -1,22 +1,13 @@ FROM archlinux AS bootstrap +COPY setup.sh /tmp/setup.sh COPY resolv.conf /etc/resolv.conf - -RUN pacman -Sy --noconfirm wget \ - && pacman-key --init \ - && pacman-key --recv-key 7A6646A6C14690C0 \ - && pacman-key --lsign-key 7A6646A6C14690C0 \ - && pacman -U --noconfirm 'https://arch-repo.magicuser.cf/medzikuser-mirrorlist.pkg.tar.xz' \ - && yes | pacman -Scc - -COPY pacman.conf /etc/pacman.conf COPY mirrorlist /etc/pacman.d/mirrorlist -RUN pacman -Syu --noconfirm \ - && yes | pacman -Scc - -RUN useradd --create-home build +RUN bash /tmp/setup.sh && \ + rm -rf /tmp/* +COPY pacman.conf /etc/pacman.conf COPY sudoers /etc/sudoers # Create final image @@ -27,4 +18,5 @@ COPY --from=bootstrap / / RUN ldconfig ENV LANG=en_US.UTF-8 + CMD ["/usr/bin/bash"] diff --git a/base/makepkg.conf b/base/makepkg.conf index 4d3790a..6e78f75 100644 --- a/base/makepkg.conf +++ b/base/makepkg.conf @@ -147,7 +147,7 @@ COMPRESSLZ=(lzip -c -f) # EXTENSION DEFAULTS ######################################################################### # -PKGEXT='.pkg.tar.xz' +PKGEXT='.pkg.tar.zst' SRCEXT='.src.tar.gz' ######################################################################### diff --git a/base/pacman.conf b/base/pacman.conf index 53f3fd8..f1d73df 100644 --- a/base/pacman.conf +++ b/base/pacman.conf @@ -30,10 +30,10 @@ Architecture = auto # Misc options #UseSyslog -#Color +Color #NoProgressBar #CheckSpace -#VerbosePkgLists +VerbosePkgLists ParallelDownloads = 5 # By default, pacman accepts packages signed by keys that its local keyring diff --git a/base/setup.sh b/base/setup.sh new file mode 100755 index 0000000..e9fa15f --- /dev/null +++ b/base/setup.sh @@ -0,0 +1,21 @@ +#!/bin/bash +set -e -u + +# Add Medzik AUR repo +pacman-key --init +pacman-key --recv-key 7A6646A6C14690C0 +pacman-key --lsign-key 7A6646A6C14690C0 +pacman -U --noconfirm 'https://arch-repo.magicuser.cf/medzikuser-mirrorlist.pkg.tar.xz' + +# Install packages +PACKAGES=('base') +PACKAGES+=('wget') +PACKAGES+=('curl') + +pacman -Syu --noconfirm ${PACKAGES} + +# Clean pacman cache +yes | pacman -Scc + +# Create `build` user +useradd --create-home build