aboutsummaryrefslogtreecommitdiffstats
path: root/debian-buster-jenkins/Dockerfile
blob: 2e3855bf8e8d72630a201ed51c76bf2187cbd74d (plain)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# Image used to run contrib/jenkins.sh scripts of most Osmocom projects.
# See master-builds.yml, gerrit-verifications.yml in osmo-ci.git.

ARG	DEBIAN_VERSION=buster
ARG	REGISTRY=docker.io
FROM	${REGISTRY}/debian:${DEBIAN_VERSION}
# Arguments used after FROM must be specified again
ARG	OSMOCOM_REPO_MIRROR="http://download.opensuse.org"
ARG	OSMOCOM_REPO_PATH="repositories/network:/osmocom:"

# Make "$DEBIAN_VERSION" available after FROM
# https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact
ARG DEBIAN_VERSION

# Install apt dependencies (keep in alphabetic order)
RUN \
	[ "$(arch)" = "x86_64" ] && dpkg --add-architecture i386; \
	DEBIAN_FRONTEND=noninteractive apt-get update && \
	DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \
	DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
		asciidoc \
		asciidoc-dblatex \
		autoconf \
		autoconf-archive \
		automake \
		bc \
		bison \
		bzip2 \
		cmake \
		coccinelle \
		cppcheck \
		dahdi-source \
		dblatex \
		dbus \
		debhelper \
		devscripts \
		dh-autoreconf \
		dh-systemd \
		docbook5-xml \
		doxygen \
		flex \
		g++ \
		gawk \
		gcc \
		gcc-arm-none-eabi \
		git \
		git-buildpackage \
		graphviz \
		htop \
		inkscape \
		lcov \
		libaio-dev \
		libasound2-dev \
		libboost-all-dev \
		libc-ares-dev \
		libcsv-dev \
		libdbd-sqlite3 \
		libdbi-dev \
		libffi-dev \
		libfftw3-dev \
		libgmp-dev \
		libgnutls28-dev \
		libgps-dev \
		libgsm1-dev \
		libjansson-dev \
		liblua5.3-dev \
		libmnl-dev \
		libncurses5-dev \
		libnewlib-arm-none-eabi \
		libnl-3-dev \
		libnl-route-3-dev \
		liboping-dev \
		libortp-dev \
		libpcap-dev \
		libpcsclite-dev \
		libreadline-dev \
		libsctp-dev \
		libsigsegv-dev \
		libsnmp-dev \
		libsofia-sip-ua-glib-dev \
		libsqlite3-dev \
		libssl-dev \
		libtalloc-dev \
		libtool \
		libusb-1.0-0-dev \
		libusb-dev \
		libxml2-utils \
		libzmq3-dev \
		locales \
		lua-socket \
		make \
		mscgen \
		ofono \
		openssh-client \
		osc \
		patchelf \
		pkg-config \
		python3 \
		python3-gi \
		python3-mako \
		python3-nwdiag \
		python3-pip \
		python3-pyflakes \
		python3-setuptools \
		python3-usb \
		python3-yaml \
		python2.7 \
		python-pip \
		python-setuptools \
		python-yaml \
		rsync \
		sdcc \
		sqlite3 \
		source-highlight \
		stow \
		sudo \
		systemd \
		tcpdump \
		texinfo \
		unzip \
		wget \
		xsltproc

# Install pip dependencies (keep in alphabetic order)
RUN pip3 install \
	git+https://github.com/podshumok/python-smpplib.git \
	git+https://github.com/eriwen/lcov-to-cobertura-xml.git \
	pydbus \
	pysispm

# match the outside user
RUN useradd --uid=1000 build
#RUN echo "build ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/build

RUN mkdir /build
RUN chown build:build /build

# Install osmo-python-tests for python2 (when building old tags again new releases)
ARG OSMO_PYTHON2_TESTS_COMMIT=fb4b813d4df62b7b2445bdced961eb1847267eed
ADD http://git.osmocom.org/python/osmo-python-tests/patch/?id=$OSMO_PYTHON2_TESTS_COMMIT /tmp/osmo-python-tests2-commit
RUN git clone https://git.osmocom.org/python/osmo-python-tests osmo-python-tests2 && \
	cd osmo-python-tests2 && \
	git checkout $OSMO_PYTHON2_TESTS_COMMIT && \
	python2 setup.py clean build install

# Install osmo-python-tests for python3
ADD http://git.osmocom.org/python/osmo-python-tests/patch /tmp/osmo-python-tests3-commit
RUN git clone https://git.osmocom.org/python/osmo-python-tests osmo-python-tests3 && \
	cd osmo-python-tests3 && \
	python3 setup.py clean build install

# Install osmo-ci.git/scripts to /usr/local/bin
ADD http://git.osmocom.org/osmo-ci/patch /tmp/osmo-ci-commit
RUN git clone https://git.osmocom.org/osmo-ci osmo-ci && \
	cp -v $(find osmo-ci/scripts \
		-maxdepth 1 \
		-type f ) \
	   /usr/local/bin

# Install osmo-gsm-manuals to /opt/osmo-gsm-manuals
ADD http://git.osmocom.org/osmo-gsm-manuals/patch /tmp/osmo-gsm-manuals-commit
RUN git -C /opt clone https://git.osmocom.org/osmo-gsm-manuals

# Set a UTF-8 locale
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
    dpkg-reconfigure --frontend=noninteractive locales && \
    update-locale LANG=en_US.UTF-8
ENV LANG en_US.UTF-8

# Install packages from Osmocom OBS repositories:
# * osmo-remsim: libulfius
# * osmo-trx: liblimesuite-dev, libuhd-dev
ARG	OSMOCOM_REPO="${OSMOCOM_REPO_MIRROR}/${OSMOCOM_REPO_PATH}/nightly/Debian_10/"
COPY	.common/Release.key /tmp/Release.key
RUN	apt-key add /tmp/Release.key && \
	rm /tmp/Release.key && \
	echo "deb " $OSMOCOM_REPO " ./" > /etc/apt/sources.list.d/osmocom-nightly.list
ADD	$OSMOCOM_REPO/Release /tmp/Release
RUN	apt-get update && \
	apt-get install -y --no-install-recommends \
		liblimesuite-dev \
		libuhd-dev \
		libulfius-dev && \
	apt-get clean

# osmo-python-tests' contrib/jenkins.sh writes to /usr/local as user
RUN chown -R build:build /usr/local