aboutsummaryrefslogtreecommitdiffstats
path: root/osmo-hnbgw-master/Dockerfile
blob: 4f7fbb5f2be5c29def3f3159f6359a0a99f979c0 (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
ARG	USER
ARG	DISTRO
FROM	$USER/$DISTRO-build
# Arguments used after FROM must be specified again
ARG	DISTRO

RUN	apt-get update && \
	apt-get install -y --no-install-recommends \
		libosmocore-dev \
		libosmo-abis-dev \
		libosmo-mgcp-client-dev \
		libosmo-netif-dev \
		libosmo-sigtran-dev \
		libosmo-ranap-dev \
		libosmo-rua-dev \
		libosmo-hnbap-dev \
		libasn1c-dev && \
	apt-get clean

WORKDIR	/tmp

ARG	OSMO_HNBGW_BRANCH="master"

RUN	git clone git://git.osmocom.org/osmo-hnbgw.git
ADD	http://git.osmocom.org/osmo-hnbgw/patch?h=$OSMO_HNBGW_BRANCH /tmp/commit-osmo-hnbgw

RUN	cd osmo-hnbgw && \
	git fetch && git checkout $OSMO_HNBGW_BRANCH && \
	(git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_HNBGW_BRANCH || exit 1); \
	git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
	autoreconf -fi && \
	./configure && \
	make "-j$(nproc)" install && \
	ldconfig

VOLUME	/data

COPY	osmo-hnbgw.cfg /data/osmo-hnbgw.cfg

WORKDIR	/data
CMD	["/bin/sh", "-c", "/usr/local/bin/osmo-hnbgw -c /data/osmo-hnbgw.cfg >/data/osmo-hnbgw.log 2>&1"]