File: Dockerfile.ubuntu

package info (click to toggle)
flashprog 1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,104 kB
  • sloc: ansic: 61,779; makefile: 919; sh: 310
file content (46 lines) | stat: -rw-r--r-- 1,288 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FROM manibase

RUN \
	useradd -p locked -m mani && \
	if [ -f /etc/apt/sources.list.d/ubuntu.sources ]; then \
		true; \
	elif grep -q main /etc/apt/sources.list; then \
		if ! grep -q universe /etc/apt/sources.list; then \
			sed -i -e 's/ main$/ main universe/' \
				/etc/apt/sources.list || exit 1; \
		fi; \
	else \
		url="http://ports.ubuntu.com/" && \
		cn="$(sed -ne's/DISTRIB_CODENAME=//p' /etc/lsb-release)" && \
		for t in "" "-updates" "-security"; do \
			echo "deb ${url} ${cn}${t} main universe" \
				>>/etc/apt/sources.list || exit 1; \
		done; \
	fi && \
	apt-get -qq update && \
	apt-get -qq upgrade && \
	apt-get -qqy install gcc make git doxygen ccache pkg-config meson \
		libpci-dev libftdi1-dev libusb-1.0-0-dev && \
	{ apt-get -qqy install libjaylink-dev libgpiod-dev || true; } && \
	apt-get clean

RUN mkdir -p -m 1777 /ccache

ENV GIT_SSL_NO_VERIFY=1
USER mani

ARG ORIGIN=https://review.sourcearcade.org/flashprog.git
RUN \
	cd && \
	mkdir .ccache && chown mani:mani .ccache && \
	git clone ${ORIGIN} flashprog

ARG IDENT=mani
ARG CCACHE_MAX=32M
RUN \
	ccache --set-config cache_dir=/ccache/${IDENT} && \
	ccache --set-config max_size=${CCACHE_MAX}

ENV DEVSHELL /bin/bash
COPY mani-wrapper.sh /home/mani/
ENTRYPOINT ["/bin/sh", "/home/mani/mani-wrapper.sh"]