-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (28 loc) · 1.11 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM archlinux/base as builder
MAINTAINER Chris Fordham <[email protected]>
COPY sudoers.d/build /etc/sudoers.d/
RUN pacman-key --init && \
pacman-db-upgrade && \
update-ca-trust && \
pacman -Syyu --noconfirm base-devel git archlinux-keyring curl tar reflector && \
useradd -d /usr/local/build -m -G wheel build && \
# we do this mostly just because a lot of mirrors are unreliable
reflector --verbose --latest 5 --sort rate --save /etc/pacman.d/mirrorlist
USER build
RUN cd /tmp && \
curl https://aur.archlinux.org/cgit/aur.git/snapshot/aurman.tar.gz > aurman.tar.gz && \
tar zxvf aurman.tar.gz && \
cd aurman && \
gpg --recv-keys 4C3CE98F9579981C21CA1EC3465022E743D71E39 && \
makepkg -s --noconfirm --needed && \
sudo -E pacman -U --noconfirm ./aurman*.tar.xz
FROM builder
VOLUME /usr/local/build/src
USER build
RUN mkdir -p "$HOME/src"
WORKDIR /usr/local/build/src
COPY docker-entrypoint.sh /opt/bin/docker-entrypoint.sh
ENTRYPOINT ["/opt/bin/docker-entrypoint.sh"]
CMD sudo -E pacman -Sy && \
makepkg -sfc --noconfirm --needed && \
makepkg --printsrcinfo > .SRCINFO