aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Novikov2020-09-14 17:10:06 +0300
committerAndrey Novikov2020-09-14 17:10:06 +0300
commita9bc2b64612ea990aa7a07f664bf60c46d1c6d32 (patch)
tree14cd630b3d188b6199a29f8beb34fa766d42128d
parentc82a8e6954b7eb49f67b57738867c9dc26316b7e (diff)
downloadaur-a9bc2b64612ea990aa7a07f664bf60c46d1c6d32.tar.gz
Add builder Dockerfile for cases when no ArchLinux machine is available
-rw-r--r--Dockerfile11
-rw-r--r--README.md23
2 files changed, 34 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 000000000000..deab86b09cff
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,11 @@
+FROM archlinux
+
+RUN pacman -Syu --noconfirm --needed base-devel
+
+RUN groupadd --gid 1000 aur \
+ && useradd --uid 1000 --gid aur --create-home aur \
+ && usermod -aG wheel aur \
+ && echo '%wheel ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers \
+ && visudo -c
+
+WORKDIR /home/aur
diff --git a/README.md b/README.md
index 9d1a2a694cda..d2e334808857 100644
--- a/README.md
+++ b/README.md
@@ -18,3 +18,26 @@ Fast and secure standalone server for resizing and converting remote images
```
4. Commit and push changes
+
+## Testing build in Docker
+
+In case if you don't have ArchLinux machine available at moment.
+
+ 1. Build docker image
+
+ ```sh
+ docker build -t aur-builder .
+ ```
+
+ 2. Run shell in container:
+
+ ```sh
+ docker run --rm -it -v $(pwd):/home/aur -u $(id -u) aur-builder sh
+ ```
+
+ 3. Run `makepkg` in it as usual:
+
+ ```sh
+ makepkg --printsrcinfo > .SRCINFO
+ makepkg --syncdeps
+ ```