forked from epri-dev/OpenADR-VEN-Library
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (34 loc) · 1.23 KB
/
Dockerfile
File metadata and controls
42 lines (34 loc) · 1.23 KB
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
#syntax=docker/dockerfile:1.2
ARG baseimage=ubuntu:20.04
######################################
# Builder
######################################
FROM ${baseimage} AS builder
ARG DEBIAN_FRONTEND=noninteractive
RUN set -ex \
&& echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/00-no-recommends \
&& echo 'APT::Install-Suggests "false";' > /etc/apt/apt.conf.d/00-no-suggestions \
&& apt-get update \
&& apt-get install --yes \
ccache \
cmake \
g++ \
lcov \
libcurl4-gnutls-dev \
libpthread-stubs0-dev \
libxerces-c-dev \
libxml-security-c-dev \
make \
python3 \
python3-pip \
tzdata \
&& pip3 install fastcov==1.10
WORKDIR /openadr-ven-library
######################################
# Build Artifacts
######################################
FROM builder AS artifacts
COPY . .
RUN --mount=type=cache,target=/root/.ccache,readwrite set -ex \
&& cmake -B build -DTEST=1 \
&& cmake --build build -j$(nproc)