Skip to content

Instantly share code, notes, and snippets.

@fthiery
Last active October 27, 2020 10:55
Show Gist options
  • Save fthiery/1d01065ac59c5b6f3ec2a35b53b2804c to your computer and use it in GitHub Desktop.
Save fthiery/1d01065ac59c5b6f3ec2a35b53b2804c to your computer and use it in GitHub Desktop.
Dockerfile to test building Arch packages build cleanly
# you can add an alias to your bashrc to check that packages build
# alias makepkg_check = 'docker build -f /path/to/this/Dockerfile.archtest .'
FROM archlinux:latest
RUN pacman -Sy && pacman -S --noconfirm --noprogressbar --quiet --needed \
base-devel sudo
RUN useradd --create-home build --home-dir /build && echo "build ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/build
USER build
ADD PKGBUILD /build/PKGBUILD
WORKDIR /build
RUN makepkg --syncdeps --noconfirm -r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment