mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-06-28 23:01:44 +00:00
build: docker image generation improvements
There are two major changes here. First of all, the image generation now consist of two separated stages, the build itself and the production image generation. Secondly, the packages inside image are now installed as they were at the time of the root image generation (defined by stat command) Another side change is that container does not longer ship syncronized (and out-of-dated) pacman databases; they have to be synced manually
This commit is contained in:
@ -4,8 +4,12 @@ set -e
|
||||
|
||||
for PACKAGE in "$@"; do
|
||||
BUILD_DIR="$(mktemp -d)"
|
||||
# clone the remote source
|
||||
git clone https://aur.archlinux.org/"$PACKAGE".git "$BUILD_DIR"
|
||||
cd "$BUILD_DIR"
|
||||
# checkout to the image date
|
||||
git checkout "$(git rev-list -1 --before="$(stat -c "%y" "/var/lib/pacman" | cut -d " " -f 1)" master)"
|
||||
# build and install the package
|
||||
makepkg --nocheck --noconfirm --install --rmdeps --syncdeps
|
||||
cd /
|
||||
rm -r "$BUILD_DIR"
|
||||
|
Reference in New Issue
Block a user