aboutsummaryrefslogtreecommitdiffstats
path: root/debian-buster-erlang/Dockerfile
blob: 401abe6a9f6f66a4f500be9862cf6cbe1e0fdf01 (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
ARG	REGISTRY=docker.io
FROM	${REGISTRY}/debian:buster
# 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_10/"

# install the erlang vm and rebar (2)
RUN	apt-get update && \
	apt-get upgrade -y && \
	apt-get -y install \
		erlang \
		rebar

# add rebar3
ADD	https://s3.amazonaws.com/rebar3/rebar3 /usr/bin/rebar3
RUN	chmod 0755 /usr/bin/rebar3

# install ninimal build utilities as well as system utilities
RUN	apt-get update && \
	apt-get -y install \
		build-essential \
		git \
		procps \
		tcpdump \
		vim \
		netcat-openbsd \
		wget \
		&& \
	apt-get clean

# install additional C-language / system dependencies of our Erlang projects
RUN	apt-get update && \
	apt-get -y install \
		libpcap-dev \
		&& \
	apt-get clean

# add osmocom latest repo, should we ever require packages from there
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

# add a non-root user under which we will normaly execute build tests
RUN	useradd -m build
WORKDIR	/home/build
USER	build