blob: b9b818f75bd56fc6a647fd531b3e5fd16e4acf34 [file] [log] [blame]
Nico Huberc0b52db2022-12-15 12:42:32 +00001FROM manibase
2
3RUN \
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 Huberb115c982023-03-02 23:10:05 +000020 apt-get -qqy install gcc make git doxygen ccache pkg-config meson \
Nico Hubere59061a2023-03-02 23:08:09 +000021 libpci-dev libftdi1-dev libusb-1.0-0-dev && \
Steve Markgraf61899472023-01-09 23:06:52 +010022 { apt-get -qqy install libjaylink-dev libgpiod-dev || true; } && \
Nico Huberc0b52db2022-12-15 12:42:32 +000023 apt-get clean
24
Nico Huberfb433ba2023-03-04 19:09:47 +000025RUN mkdir -p -m 1777 /ccache
26
Nico Huberc0b52db2022-12-15 12:42:32 +000027ENV GIT_SSL_NO_VERIFY=1
28USER mani
29
Nico Huberc3b02dc2023-08-12 01:13:45 +020030ARG ORIGIN=https://review.sourcearcade.org/flashprog.git
Nico Huberc0b52db2022-12-15 12:42:32 +000031RUN \
32 cd && \
33 mkdir .ccache && chown mani:mani .ccache && \
Nico Huberc3b02dc2023-08-12 01:13:45 +020034 git clone ${ORIGIN} flashprog
Nico Huberc0b52db2022-12-15 12:42:32 +000035
Nico Huberfb433ba2023-03-04 19:09:47 +000036ARG IDENT=mani
37ARG CCACHE_MAX=32M
38RUN \
39 ccache --set-config cache_dir=/ccache/${IDENT} && \
40 ccache --set-config max_size=${CCACHE_MAX}
41
Nico Huberc0b52db2022-12-15 12:42:32 +000042ENV DEVSHELL /bin/bash
43COPY mani-wrapper.sh /home/mani/
44ENTRYPOINT ["/bin/sh", "/home/mani/mani-wrapper.sh"]