aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile.in
blob: 1af7099957e1039c2f31d707308d65c6a9f30156 (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
FROM %%ALPINE_IMG%%/alpine:%%ALPINE_TAG%%
MAINTAINER Richard Mortier <mort@cantab.net>

RUN rm /etc/apk/repositories && \
    printf -- >> /etc/apk/repositories \
      'http://dl-cdn.alpinelinux.org/alpine/%%ALPINE_REL%%/%s\n' \
      main community $(test edge = "%%ALPINE_TAG%%" && echo testing) && \
    printf -- >> /etc/apk/repositories \
      '/home/builder/packages/%s\n' \
      main community testing

RUN apk add --update-cache \
      alpine-conf \
      alpine-sdk \
      sudo \
      ccache \
    && apk upgrade -a \
    && setup-apkcache /var/cache/apk

RUN adduser -D builder \
    && addgroup builder abuild \
    && echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers

USER builder
WORKDIR /home/builder
COPY entrypoint.sh /home/builder
RUN mkdir packages

ENTRYPOINT ["/home/builder/entrypoint.sh"]