Debian Codegraph @

src/deps/miniasync/utils/docker/images/Dockerfile.ubuntu-21.04

raw
1 #
2 # SPDX-License-Identifier: BSD-3-Clause
3 # Copyright 2016-2022, Intel Corporation
4 #
5
6 #
7 # Dockerfile - a 'recipe' for Docker to build an image of ubuntu-based
8 # environment prepared for running tests of miniasync.
9 #
10
11 # Pull base image
12 FROM ubuntu:21.04
13 MAINTAINER [email protected]
14
15 ENV DEBIAN_FRONTEND noninteractive
16
17 # Additional parameters to build docker without building components
18 ARG SKIP_SCRIPTS_DOWNLOAD
19
20 # Update the Apt cache and install basic tools
21 RUN apt-get update && apt-get dist-upgrade -y
22
23 # base deps
24 ENV BASE_DEPS "\
25 apt-utils \
26 build-essential \
27 clang \
28 devscripts \
29 git \
30 pkg-config \
31 sudo \
32 whois \
33 cmake \
34 curl \
35 gawk \
36 groff \
37 graphviz \
38 pandoc"
39
40 ENV TOOLS_DEPS "\
41 automake \
42 autotools-dev \
43 libc6-dbg \
44 python3-jinja2"
45
46 ENV TESTS_DEPS "\
47 pylint3 \
48 python3-pip \
49 python3-pytest"
50
51 ENV PYTHON_DEPS "\
52 markdown2 \
53 matplotlib \
54 pandas"
55
56 # Coverity
57 ENV COVERITY_DEPS ruby gcc g++ wget
58
59 # MINIASYNC deps
60 ENV MINIASYNC_DEPS "\
61 cmake \
62 curl \
63 gawk \
64 groff \
65 graphviz \
66 pandoc"
67
68 # MINIASYNC-VDM-DML deps
69 ENV MINIASYNC_DML_DEPS "\
70 uuid-dev"
71
72 # Install all required packages
73 RUN apt-get install -y --no-install-recommends \
74 $BASE_DEPS \
75 $TOOLS_DEPS \
76 $TESTS_DEPS \
77 $COVERITY_DEPS \
78 $MINIASYNC_DEPS \
79 $MINIASYNC_DML_DEPS \
80 && rm -rf /var/lib/apt/lists/*
81
82 RUN pip3 install --upgrade pip
83
84 # Install valgrind
85 COPY install-valgrind.sh install-valgrind.sh
86 RUN ./install-valgrind.sh ubuntu
87
88 # Install txt2man
89 COPY install-txt2man.sh install-txt2man.sh
90 RUN ./install-txt2man.sh
91
92 # Install DML
93 COPY install-dml.sh install-dml.sh
94 RUN ./install-dml.sh
95
96 # Download scripts required in run-*.sh
97 COPY download-scripts.sh download-scripts.sh
98 COPY 0001-fix-generating-gcov-files-and-turn-off-verbose-log.patch 0001-fix-generating-gcov-files-and-turn-off-verbose-log.patch
99 RUN ./download-scripts.sh
100
101 # Add user
102 ENV USER user
103 ENV USERPASS p1a2s3s4
104 RUN useradd -m $USER -g sudo -p `mkpasswd $USERPASS`
105 USER $USER
106
107 # Set required environment variables
108 ENV OS ubuntu
109 ENV OS_VER 21.04
110 ENV PACKAGE_MANAGER deb
111 ENV NOTTY 1
112
113 # install python modules for the default user
114 RUN pip3 install --user $PYTHON_DEPS