aboutsummaryrefslogtreecommitdiffstats
path: root/debian-stretch-titan/Dockerfile
blob: 39ff76f4b16536278e7d1b0c9620d44f7987b6d3 (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
ARG	REGISTRY=docker.io
ARG	UPSTREAM_DISTRO=debian:stretch
FROM	${REGISTRY}/${UPSTREAM_DISTRO}
# Arguments used after FROM must be specified again
ARG	OSMOCOM_REPO_MIRROR="http://download.opensuse.org"

MAINTAINER Harald Welte <laforge@gnumonks.org>

ARG	OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/latest/Debian_9.0/"

RUN	apt-get update && apt-get install -y \
		gnupg

COPY	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-latest.list

ADD	$OSMOCOM_REPO/Release /tmp/Release
RUN	apt-get update && \
	apt-get install -y --no-install-recommends --no-install-suggests \
		eclipse-titan

RUN	apt-get update && \
	apt-get upgrade -y && \
	DEBIAN_FRONTEND='noninteractive' apt-get install -y --no-install-recommends --no-install-suggests \
		build-essential \
		git \
		procps \
		tcpdump \
		wireshark-common \
		vim \
		netcat-openbsd \
		&& \
	apt-get clean

# somehow Debian folks updated the gcc version but not titan :/
RUN	sed -i 's/^#error/\/\/#error/' /usr/include/titan/cversion.h


# binary-only transcoding library for RANAP/RUA/HNBAP to work around TITAN only implementing BER
RUN	apt-get update && \
	apt-get -y install wget
RUN	DPKG_ARCH="$(dpkg --print-architecture)" && export $DPKG_ARCH && \
	wget https://ftp.osmocom.org/binaries/libfftranscode/libfftranscode0_0.3_${DPKG_ARCH}.deb && \
	wget https://ftp.osmocom.org/binaries/libfftranscode/libfftranscode-dev_0.3_${DPKG_ARCH}.deb && \
	dpkg -i ./libfftranscode0_0.3_${DPKG_ARCH}.deb ./libfftranscode-dev_0.3_${DPKG_ARCH}.deb && \
	apt install --fix-broken && \
	rm libfftranscode*.deb

RUN	git config --global user.email docker@dock.er && \
	git config --global user.name "Dock Er"

# clone osmo-ttcn3-hacks and deps, invalidate cache if deps change (OS#5017)
RUN	git clone git://git.osmocom.org/osmo-ttcn3-hacks.git && \
	make -C /osmo-ttcn3-hacks deps
ADD	https://git.osmocom.org/osmo-ttcn3-hacks/plain/deps/Makefile /tmp/deps-Makefile
RUN	if ! diff -q /tmp/deps-Makefile /osmo-ttcn3-hacks/deps/Makefile; then \
		cd /osmo-ttcn3-hacks && \
		git pull && \
		make deps; \
	fi