Nico Huber | c0b52db | 2022-12-15 12:42:32 +0000 | [diff] [blame] | 1 | FROM manibase |
| 2 | |
Nico Huber | 9b2f052 | 2023-02-26 15:17:03 +0000 | [diff] [blame] | 3 | COPY isrgrootx1.pem /etc/ssl/cert.pem |
| 4 | |
Nico Huber | c0b52db | 2022-12-15 12:42:32 +0000 | [diff] [blame] | 5 | RUN \ |
| 6 | adduser -D mani mani && \ |
Nico Huber | c0b52db | 2022-12-15 12:42:32 +0000 | [diff] [blame] | 7 | apk update && \ |
Nico Huber | 9b2f052 | 2023-02-26 15:17:03 +0000 | [diff] [blame] | 8 | apk add build-base linux-headers git ccache \ |
Nico Huber | 582267f | 2023-02-26 15:22:37 +0000 | [diff] [blame] | 9 | pciutils-dev libusb-dev libftdi1-dev && \ |
Nico Huber | 9b2f052 | 2023-02-26 15:17:03 +0000 | [diff] [blame] | 10 | 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 Huber | c0b52db | 2022-12-15 12:42:32 +0000 | [diff] [blame] | 14 | |
Nico Huber | 74e0f52 | 2023-02-26 15:23:37 +0000 | [diff] [blame] | 15 | RUN apk add libgpiod-dev meson || true |
Steve Markgraf | 6189947 | 2023-01-09 23:06:52 +0100 | [diff] [blame] | 16 | |
Nico Huber | c0b52db | 2022-12-15 12:42:32 +0000 | [diff] [blame] | 17 | # fix weird permissions in armhf-v3.11 |
| 18 | RUN [ -d /usr/share/git-core/templates ] && \ |
| 19 | chmod -R a+r /usr/share/git-core/templates |
| 20 | |
Nico Huber | fb433ba | 2023-03-04 19:09:47 +0000 | [diff] [blame] | 21 | RUN mkdir -p -m 1777 /ccache |
| 22 | |
Nico Huber | c0b52db | 2022-12-15 12:42:32 +0000 | [diff] [blame] | 23 | ENV GIT_SSL_NO_VERIFY=1 |
| 24 | USER mani |
| 25 | |
Nico Huber | c3b02dc | 2023-08-12 01:13:45 +0200 | [diff] [blame] | 26 | ARG ORIGIN=https://review.sourcearcade.org/flashprog.git |
Nico Huber | c0b52db | 2022-12-15 12:42:32 +0000 | [diff] [blame] | 27 | RUN \ |
| 28 | cd && \ |
| 29 | mkdir .ccache && chown mani:mani .ccache && \ |
Nico Huber | c3b02dc | 2023-08-12 01:13:45 +0200 | [diff] [blame] | 30 | git clone ${ORIGIN} flashprog |
Nico Huber | c0b52db | 2022-12-15 12:42:32 +0000 | [diff] [blame] | 31 | |
Nico Huber | fb433ba | 2023-03-04 19:09:47 +0000 | [diff] [blame] | 32 | ARG IDENT=mani |
| 33 | ARG CCACHE_MAX=32M |
| 34 | RUN \ |
| 35 | ccache --set-config cache_dir=/ccache/${IDENT} && \ |
| 36 | ccache --set-config max_size=${CCACHE_MAX} |
| 37 | |
Nico Huber | c0b52db | 2022-12-15 12:42:32 +0000 | [diff] [blame] | 38 | ENV DEVSHELL /bin/sh |
| 39 | COPY mani-wrapper.sh /home/mani/ |
| 40 | ENTRYPOINT ["/bin/sh", "/home/mani/mani-wrapper.sh"] |