~dricottone/huttese-apk

huttese-apk/Dockerfile -rw-r--r-- 1.3 KiB
c845640fDominic Ricottone Cleanup 1 year, 8 months ago
                                                                                
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
FROM alpine:3.17

# apk
COPY repositories /etc/apk/repositories
COPY keys/me@dominic-ricottone.com.rsa.pub /etc/apk/keys/me@dominic-ricottone.com.rsa.pub
RUN chmod 644 /etc/apk/keys/me@dominic-ricottone.com.rsa.pub
RUN apk update --update-cache && apk add abuild sudo

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

# abuild
RUN mkdir /home/builder/.abuild
COPY keys/me@dominic-ricottone.com.rsa /home/builder/.abuild/me@dominic-ricottone.com.rsa
COPY keys/me@dominic-ricottone.com.rsa.pub /home/builder/.abuild/me@dominic-ricottone.com.rsa.pub
RUN chmod 600 /home/builder/.abuild/me@dominic-ricottone.com.rsa /home/builder/.abuild/me@dominic-ricottone.com.rsa.pub
RUN sh -c 'echo "PACKAGER_PRIVKEY=\"/home/builder/.abuild/me@dominic-ricottone.com.rsa\"" >> /home/builder/.abuild/abuild.conf'
RUN chown builder /home/builder/.abuild/ -R

# pkg
RUN mkdir /home/builder/packages
VOLUME /home/builder/packages/huttese-pkgsrc/
RUN chown builder /home/builder/packages/ -R

# pkgsrcs
COPY --chown=builder:abuild pkgsrc /var/huttese-pkgsrc
COPY --chown=builder:abuild build.sh /var/huttese-pkgsrc/build.sh
WORKDIR /var/huttese-pkgsrc

USER builder
ENTRYPOINT ["/var/huttese-pkgsrc/build.sh"]
CMD ["py3-orderedmultidict"]