blob: 63b6e74677b51905282c25f96aebb4ebc0f9ce67 [file] [log] [blame]
Oliver Smitha8153572019-09-20 10:43:03 +02001ARG DEBIAN_VERSION=stretch
Holger Hans Peter Freytherf8a08532019-02-19 03:41:25 +00002FROM debian:${DEBIAN_VERSION}
Holger Hans Peter Freyther71737f22017-08-25 18:20:35 +08003
Oliver Smitha94d67f2019-10-10 10:02:17 +02004# Make "$DEBIAN_VERSION" available after FROM
5# https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact
6ARG DEBIAN_VERSION
7
Oliver Smith7c987a82019-10-11 09:40:08 +02008# Install apt dependencies (keep in alphabetic order)
Holger Hans Peter Freytherc52d3502018-08-26 16:20:37 +01009RUN \
Oliver Smith7c987a82019-10-11 09:40:08 +020010 dpkg --add-architecture i386 && \
11 DEBIAN_FRONTEND=noninteractive apt-get update && \
12 DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \
13 DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
14 asciidoc \
15 asciidoc-dblatex \
16 autoconf \
17 autoconf-archive \
18 automake \
19 bc \
20 bison \
21 bzip2 \
Oliver Smithf8d85c92019-07-24 11:03:36 +020022 cmake \
Oliver Smith7c987a82019-10-11 09:40:08 +020023 coccinelle \
24 cppcheck \
Harald Welte803216f2019-11-12 07:37:57 +010025 dahdi-source \
Oliver Smith7c987a82019-10-11 09:40:08 +020026 dblatex \
27 dbus \
28 debhelper \
29 devscripts \
30 dh-autoreconf \
31 dh-systemd \
32 docbook5-xml \
33 doxygen \
34 flex \
35 g++ \
36 gawk \
37 gcc \
38 gcc-arm-none-eabi \
39 git \
40 git-buildpackage \
41 graphviz \
42 htop \
Oliver Smithd52cb3c2019-12-05 16:51:49 +010043 inkscape \
Oliver Smith7c987a82019-10-11 09:40:08 +020044 lcov \
45 libaio-dev \
46 libasound2-dev \
47 libboost-all-dev \
48 libc-ares-dev \
49 libcsv-dev \
50 libdbd-sqlite3 \
51 libdbi-dev \
52 libffi-dev \
53 libfftw3-dev \
54 libgmp-dev \
55 libgnutls28-dev \
56 libgps-dev \
57 libgsm1-dev \
58 liblua5.3-dev \
59 libmnl-dev \
60 libncurses5-dev \
61 libnewlib-arm-none-eabi \
62 liboping-dev \
63 libortp-dev \
64 libpcap-dev \
65 libpcsclite-dev \
66 libreadline-dev \
67 libsctp-dev \
68 libsigsegv-dev \
69 libsnmp-dev \
70 libsofia-sip-ua-glib-dev \
71 libsqlite3-dev \
72 libssl-dev \
73 libtalloc-dev \
74 libtool \
75 libusb-1.0-0-dev \
76 libusb-dev \
77 libxml2-utils \
78 libzmq3-dev \
79 locales \
80 lua-socket \
81 make \
82 mscgen \
83 ofono \
84 openssh-client \
85 osc \
86 patchelf \
87 pkg-config \
Oliver Smith7c987a82019-10-11 09:40:08 +020088 python3 \
89 python3-gi \
90 python3-mako \
Oliver Smith1cb0aa92019-11-22 11:22:50 +010091 python3-nwdiag \
Oliver Smith7c987a82019-10-11 09:40:08 +020092 python3-pip \
93 python3-pyflakes \
94 python3-setuptools \
95 python3-usb \
96 python3-yaml \
Oliver Smith7c987a82019-10-11 09:40:08 +020097 rsync \
98 sdcc \
99 sqlite3 \
100 stow \
101 sudo \
102 systemd \
103 tcpdump \
104 texinfo \
105 unzip \
106 wget \
107 xsltproc
Holger Hans Peter Freyther71737f22017-08-25 18:20:35 +0800108
Oliver Smith7c987a82019-10-11 09:40:08 +0200109# Install pip dependencies (keep in alphabetic order)
110RUN pip3 install \
111 git+https://github.com/podshumok/python-smpplib.git \
112 git+https://github.com/eriwen/lcov-to-cobertura-xml.git \
113 pydbus \
114 pysispm
Holger Hans Peter Freyther71737f22017-08-25 18:20:35 +0800115
116# match the outside user
117RUN useradd --uid=1000 build
118#RUN echo "build ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/build
119
120RUN mkdir /build
121RUN chown build:build /build
122
Oliver Smith7c987a82019-10-11 09:40:08 +0200123# Install osmo-python-tests
Neels Hofmeyrb3fda802017-11-29 18:48:01 +0100124ADD http://git.osmocom.org/python/osmo-python-tests/patch /tmp/commit
Neels Hofmeyr577f2a92018-01-12 14:55:32 +0100125RUN git clone git://git.osmocom.org/python/osmo-python-tests && cd osmo-python-tests && ./contrib/jenkins.sh
Holger Hans Peter Freyther707ebb12019-02-18 14:17:48 +0000126
127# Set a UTF-8 locale
Holger Hans Peter Freyther707ebb12019-02-18 14:17:48 +0000128RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
129 dpkg-reconfigure --frontend=noninteractive locales && \
130 update-locale LANG=en_US.UTF-8
131ENV LANG en_US.UTF-8
Vasil Velichkova388a9b2019-04-09 05:20:23 +0300132
Oliver Smitha94d67f2019-10-10 10:02:17 +0200133# osmo-remsim needs libulfius (which indirectly depends on systemd, installed above)
134ARG LIBULFIUS_VER="2.6.4"
135ARG LIBULFIUS_PATH="https://github.com/babelouest/ulfius/releases/download/v${LIBULFIUS_VER}"
136ADD ${LIBULFIUS_PATH}/libulfius-dev_${LIBULFIUS_VER}_debian_${DEBIAN_VERSION}_x86_64.deb /tmp/ulfius/libulfius-dev.deb
137ADD ${LIBULFIUS_PATH}/ulfius-dev-full_${LIBULFIUS_VER}_debian_${DEBIAN_VERSION}_x86_64.tar.gz /tmp/ulfius/all.tar.gz
138RUN cd /tmp/ulfius && \
139 tar -xvf all.tar.gz && \
Oliver Smith7c987a82019-10-11 09:40:08 +0200140 DEBIAN_FRONTEND=noninteractive apt-get update && \
Oliver Smitha94d67f2019-10-10 10:02:17 +0200141 DEBIAN_FRONTEND=noninteractive apt-get install -y /tmp/ulfius/*.deb && \
142 cd ~ && \
143 rm -r /tmp/ulfius
Oliver Smith88b26a32019-10-11 08:43:51 +0200144
145# osmo-python-tests' contrib/jenkins.sh writes to /usr/local as user
146RUN chown -R build:build /usr/local