blob: 6025e723b9a2373987ca2a4ddf80702e4cf72b4b [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
25ENV GIT_SSL_NO_VERIFY=1
26USER mani
27
28ARG ORIGIN=https://review.coreboot.org/flashrom-stable.git
29RUN \
30 cd && \
31 mkdir .ccache && chown mani:mani .ccache && \
32 git clone ${ORIGIN} flashrom
33
34ENV DEVSHELL /bin/bash
35COPY mani-wrapper.sh /home/mani/
36ENTRYPOINT ["/bin/sh", "/home/mani/mani-wrapper.sh"]