Nico Huber | c0b52db | 2022-12-15 12:42:32 +0000 | [diff] [blame] | 1 | FROM manibase |
| 2 | |
| 3 | RUN \ |
| 4 | useradd -p locked -m mani && \ |
| 5 | if grep -q main /etc/apt/sources.list; then \ |
| 6 | if ! grep -q universe /etc/apt/sources.list; then \ |
| 7 | sed -i -e 's/ main$/ main universe/' \ |
| 8 | /etc/apt/sources.list || exit 1; \ |
| 9 | fi; \ |
| 10 | else \ |
| 11 | url="http://ports.ubuntu.com/" && \ |
| 12 | cn="$(sed -ne's/DISTRIB_CODENAME=//p' /etc/lsb-release)" && \ |
| 13 | for t in "" "-updates" "-security"; do \ |
| 14 | echo "deb ${url} ${cn}${t} main universe" \ |
| 15 | >>/etc/apt/sources.list || exit 1; \ |
| 16 | done; \ |
| 17 | fi && \ |
| 18 | apt-get -qq update && \ |
| 19 | apt-get -qq upgrade && \ |
Nico Huber | b115c98 | 2023-03-02 23:10:05 +0000 | [diff] [blame] | 20 | apt-get -qqy install gcc make git doxygen ccache pkg-config meson \ |
Nico Huber | e59061a | 2023-03-02 23:08:09 +0000 | [diff] [blame] | 21 | libpci-dev libftdi1-dev libusb-1.0-0-dev && \ |
Steve Markgraf | 6189947 | 2023-01-09 23:06:52 +0100 | [diff] [blame] | 22 | { apt-get -qqy install libjaylink-dev libgpiod-dev || true; } && \ |
Nico Huber | c0b52db | 2022-12-15 12:42:32 +0000 | [diff] [blame] | 23 | apt-get clean |
| 24 | |
Nico Huber | fb433ba | 2023-03-04 19:09:47 +0000 | [diff] [blame] | 25 | RUN mkdir -p -m 1777 /ccache |
| 26 | |
Nico Huber | c0b52db | 2022-12-15 12:42:32 +0000 | [diff] [blame] | 27 | ENV GIT_SSL_NO_VERIFY=1 |
| 28 | USER mani |
| 29 | |
Nico Huber | c3b02dc | 2023-08-12 01:13:45 +0200 | [diff] [blame^] | 30 | ARG ORIGIN=https://review.sourcearcade.org/flashprog.git |
Nico Huber | c0b52db | 2022-12-15 12:42:32 +0000 | [diff] [blame] | 31 | RUN \ |
| 32 | cd && \ |
| 33 | mkdir .ccache && chown mani:mani .ccache && \ |
Nico Huber | c3b02dc | 2023-08-12 01:13:45 +0200 | [diff] [blame^] | 34 | git clone ${ORIGIN} flashprog |
Nico Huber | c0b52db | 2022-12-15 12:42:32 +0000 | [diff] [blame] | 35 | |
Nico Huber | fb433ba | 2023-03-04 19:09:47 +0000 | [diff] [blame] | 36 | ARG IDENT=mani |
| 37 | ARG CCACHE_MAX=32M |
| 38 | RUN \ |
| 39 | ccache --set-config cache_dir=/ccache/${IDENT} && \ |
| 40 | ccache --set-config max_size=${CCACHE_MAX} |
| 41 | |
Nico Huber | c0b52db | 2022-12-15 12:42:32 +0000 | [diff] [blame] | 42 | ENV DEVSHELL /bin/bash |
| 43 | COPY mani-wrapper.sh /home/mani/ |
| 44 | ENTRYPOINT ["/bin/sh", "/home/mani/mani-wrapper.sh"] |