-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathDockerfile.ubuntu-20.04_ctest
29 lines (21 loc) · 1.34 KB
/
Dockerfile.ubuntu-20.04_ctest
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
# syntax=docker/dockerfile:1.5
# vim:ft=dockerfile
# Dockerfile building the mesytec-mvlc library in debug mode and running the
# libraries unit tests.
# Example docker build invocation from the root of the source tree:
# DOCKER_BUILDKIT=1 docker build -f ./tools/dockerfiles/Dockerfile.debian-stable_ctest .
# Note: no zmq support under ubuntu-20.04 for now. The shipped zmq version is too old.
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND="noninteractive"
ENV TZ="Etc/UTC"
# Add the kitware apt repository to get a modern version of cmake https://apt.kitware.com/
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates gpg wget sudo \
&& wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null \
&& echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates build-essential git cmake ninja-build zlib1g-dev
COPY . /sources
WORKDIR /build
# Run cmake then compile and install the server binary.
RUN cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/install /sources \
&& ninja && ninja install && ctest .