Created
September 30, 2020 03:08
-
-
Save dbirks/4b0aea038c2619601fc844e40db7086e to your computer and use it in GitHub Desktop.
Clean build an Arch Linux package inside a container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -o errexit | |
trap "docker rm --force lens-build" EXIT | |
docker pull archlinux | |
docker run \ | |
--detach \ | |
--name lens-build \ | |
archlinux \ | |
sleep infinity | |
docker exec -i lens-build bash <<-EOF | |
set -o verbose | |
pacman -Sy --noconfirm \ | |
base-devel \ | |
git \ | |
nodejs-lts-erbium \ | |
node-gyp \ | |
yarn | |
useradd --create-home testuser | |
echo "testuser ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/testuser | |
su - testuser | |
git clone https://aur.archlinux.org/lens.git | |
cd lens | |
makepkg -si --noconfirm | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment