summaryrefslogtreecommitdiff
path: root/slave.Dockerfile
blob: 78f066e577bcad303401d767f31bec9d4bee07de (plain)
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
FROM archlinux:base-devel

WORKDIR /builder/

RUN pacman-key --init
RUN sed -i '/# The testing repositories are disabled by default/ i Include = /etc/pacman.d/pacman-releng.conf' /etc/pacman.conf
COPY pacman-releng.conf mirrorlist /etc/pacman.d/
COPY bootstrap-arch32-trust /
RUN /bootstrap-arch32-trust
RUN rm /bootstrap-arch32-trust
RUN pacman -Syu --noconfirm git openssh lsof moreutils wget devtools32
RUN sed -i ' \
  /PACKAGER/ s/.*/PACKAGER="Erich Eckner <arch at eckner dot net>"/; \
  /^OPTIONS/ s/ debug/ !debug/ \
' /etc/makepkg.conf
RUN useradd -m builder
RUN git clone https://git.archlinux32.org/builder/ /builder

RUN mkdir /builder/work
RUN mkdir /builder/.gnupg
RUN mkdir /builder/.ssh
RUN chown builder:builder /builder/work /builder/.gnupg /builder/.ssh
RUN rm /etc/ssh/ssh_config.d/20-systemd-ssh-proxy.conf

USER builder

RUN /builder/lib/load-configuration
RUN ssh -o PasswordAuthentication=No -o StrictHostKeyChecking=No -o UpdateHostKeys=Yes master@buildmaster.archlinux32.org get-assignment || :
RUN rm /builder/work/.ssh/id_rsa /builder/work/.ssh/id_rsa.pub
COPY slave.conf /builder/conf/
RUN echo 'keyserver-options auto-key-retrieve' >> .gnupg/gpg.conf

CMD /builder/bin/build-packages