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 && \ |
| 20 | apt-get -qqy install gcc make git doxygen ccache pkg-config \ |
| 21 | libpci-dev libusb-dev libftdi-dev libusb-1.0-0-dev && \ |
| 22 | { apt-get -qqy install libjaylink-dev || true; } && \ |
| 23 | apt-get clean |
| 24 | |
| 25 | ENV GIT_SSL_NO_VERIFY=1 |
| 26 | USER mani |
| 27 | |
| 28 | ARG ORIGIN=https://review.coreboot.org/flashrom-stable.git |
| 29 | RUN \ |
| 30 | cd && \ |
| 31 | mkdir .ccache && chown mani:mani .ccache && \ |
| 32 | git clone ${ORIGIN} flashrom |
| 33 | |
| 34 | ENV DEVSHELL /bin/bash |
| 35 | COPY mani-wrapper.sh /home/mani/ |
| 36 | ENTRYPOINT ["/bin/sh", "/home/mani/mani-wrapper.sh"] |