aboutsummaryrefslogtreecommitdiffstats
path: root/centos7-build/Dockerfile
blob: f449d424fc38529fc7abca96b4f56007e866d902 (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
ARG	REGISTRY=docker.io
ARG	UPSTREAM_DISTRO=centos:centos7
FROM	${REGISTRY}/${UPSTREAM_DISTRO}
# Arguments used after FROM must be specified again
ARG	OSMOCOM_REPO_MIRROR="https://downloads.osmocom.org"
ARG	OSMOCOM_REPO_PATH="packages/osmocom:"

# Use dnf package manager instead of yum, so we can use all the dnf codepaths
# that were originally written for CentOS8 in this CentOS7 image too
RUN	yum install -y dnf

# Let package metadata expire after 60 seconds instead of 48 hours
RUN	echo "metadata_expire=60" >> /etc/dnf/dnf.conf && cat /etc/dnf/dnf.conf

# Set up Osmocom OBS repository
RUN	export MIRROR_HTTPS="$(echo $OSMOCOM_REPO_MIRROR | sed s/^http:/https:/)" && \
	{ echo "[network_osmocom_nightly]"; \
	  echo "name=Nightly packages of the Osmocom project (CentOS_7)"; \
	  echo "type=rpm-md"; \
	  echo "baseurl=${OSMOCOM_REPO_MIRROR}/${OSMOCOM_REPO_PATH}/nightly/CentOS_7/"; \
	  echo "gpgcheck=1"; \
	  echo "gpgkey=${MIRROR_HTTPS}/${OSMOCOM_REPO_PATH}/nightly/CentOS_7/repodata/repomd.xml.key"; \
	  echo "enabled=1"; \
	} > /etc/yum.repos.d/network:osmocom:nightly.repo

RUN	dnf install -y \
		autoconf \
		autoconf-archive \
		autogen \
		automake \
		bison \
		c-ares-devel \
		doxygen \
		fftw-devel \
		flex \
		gawk \
		gcc \
		gcc-c++ \
		git \
		gnupg \
		gnutls-devel \
		gsm-devel \
		libdbi-dbd-sqlite \
		libdbi-devel \
		libpcap-devel \
		libtalloc-devel \
		libtool \
		libusb1-devel \
		lksctp-tools-devel \
		make \
		ncurses-devel \
		openssl-devel \
		ortp-devel \
		pcsc-lite-devel \
		pkgconfig \
		readline-devel \
		sqlite \
		sqlite-devel \
		telnet

# Make respawn.sh part of this image, so it can be used by other images based on it
COPY	.common/respawn.sh /usr/local/bin/respawn.sh

# Invalidate cache once the repository is updated
ADD	${OSMOCOM_REPO_MIRROR}/${OSMOCOM_REPO_PATH}/nightly/CentOS_7/repodata/repomd.xml /tmp/repomd.xml