blob: 408dfc3f452d25a0fd1550012ad3c4aa9f6a1dd1 [file] [log] [blame]
Nico Huberc0b52db2022-12-15 12:42:32 +00001FROM manibase
2
Nico Huber9b2f0522023-02-26 15:17:03 +00003COPY isrgrootx1.pem /etc/ssl/cert.pem
4
Nico Huberc0b52db2022-12-15 12:42:32 +00005RUN \
6 adduser -D mani mani && \
Nico Huberc0b52db2022-12-15 12:42:32 +00007 apk update && \
Nico Huber9b2f0522023-02-26 15:17:03 +00008 apk add build-base linux-headers git ccache \
Nico Huber582267f2023-02-26 15:22:37 +00009 pciutils-dev libusb-dev libftdi1-dev && \
Nico Huber9b2f0522023-02-26 15:17:03 +000010 if [ ! -h /etc/ssl/cert.pem ]; then \
11 rm -f /etc/ssl/certs/*; \
12 ln -sf /etc/ssl/cert.pem /etc/ssl/certs/ca-certificates.crt; \
13 fi
Nico Huberc0b52db2022-12-15 12:42:32 +000014
Nico Huber15e9b102024-04-25 23:05:19 +020015RUN apk add libjaylink-dev libgpiod-dev meson || true
Steve Markgraf61899472023-01-09 23:06:52 +010016
Nico Huberc0b52db2022-12-15 12:42:32 +000017# fix weird permissions in armhf-v3.11
18RUN [ -d /usr/share/git-core/templates ] && \
19 chmod -R a+r /usr/share/git-core/templates
20
Nico Huberfb433ba2023-03-04 19:09:47 +000021RUN mkdir -p -m 1777 /ccache
22
Nico Huberc0b52db2022-12-15 12:42:32 +000023ENV GIT_SSL_NO_VERIFY=1
24USER mani
25
Nico Huberc3b02dc2023-08-12 01:13:45 +020026ARG ORIGIN=https://review.sourcearcade.org/flashprog.git
Nico Huberc0b52db2022-12-15 12:42:32 +000027RUN \
28 cd && \
29 mkdir .ccache && chown mani:mani .ccache && \
Nico Huberc3b02dc2023-08-12 01:13:45 +020030 git clone ${ORIGIN} flashprog
Nico Huberc0b52db2022-12-15 12:42:32 +000031
Nico Huberfb433ba2023-03-04 19:09:47 +000032ARG IDENT=mani
33ARG CCACHE_MAX=32M
34RUN \
35 ccache --set-config cache_dir=/ccache/${IDENT} && \
36 ccache --set-config max_size=${CCACHE_MAX}
37
Nico Huberc0b52db2022-12-15 12:42:32 +000038ENV DEVSHELL /bin/sh
39COPY mani-wrapper.sh /home/mani/
40ENTRYPOINT ["/bin/sh", "/home/mani/mani-wrapper.sh"]