blob: 9b61f89530d96419629903f226a4e10163c0ba22 (
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2016-2020, Intel Corporation
#
# Dockerfile - a 'recipe' for Docker to build an image of ubuntu-based
# environment for building the PMDK project.
#
# Pull base image
FROM ubuntu:19.10
MAINTAINER piotr.balcer@intel.com
ENV DEBIAN_FRONTEND noninteractive
# Additional parameters to build docker without building components
ARG SKIP_SCRIPTS_DOWNLOAD
# libfabric (optional if libfabric-dev >= 1.4.2 is installed)
ENV FABRIC_DEPS "autoconf \
automake \
build-essential \
libtool \
unzip \
wget"
ENV VALGRIND_DEPS "autoconf \
automake \
build-essential \
git"
# pmdk base
ENV BASE_DEPS "build-essential \
git \
libdaxctl-dev \
libndctl-dev \
pkg-config"
# benchmarks (optional)
ENV BENCH_DEPS libglib2.0-dev
# examples (optional)
ENV EXAMPLES_DEPS "libfuse-dev \
libncurses5-dev \
libuv1-dev"
# documentation (optional)
ENV DOC_DEPS pandoc
# tests
ENV TESTS_DEPS "bc \
gdb \
libc6-dbg \
libunwind-dev \
ndctl \
python3 \
ssh \
strace"
# packaging
ENV PACKAGING_DEPS "debhelper \
devscripts \
fakeroot"
# CodeCov
ENV CODECOV_DEPS curl
# Coverity
ENV COVERITY_DEPS ruby gcc g++ wget
# misc
ENV MISC_DEPS "clang \
clang-format \
flake8 \
sudo \
whois"
# Copy install valgrind script
COPY install-valgrind.sh install-valgrind.sh
# Copy install libfabric script
COPY install-libfabric.sh install-libfabric.sh
# Copy codecov patch and script to download scripts required in run-*.sh
COPY download-scripts.sh download-scripts.sh
COPY 0001-fix-generating-gcov-files-and-turn-off-verbose-log.patch \
0001-fix-generating-gcov-files-and-turn-off-verbose-log.patch
# Update the Apt cache and install basic tools
RUN apt-get update && apt-get dist-upgrade -y \
&& apt-get install -y --no-install-recommends \
$FABRIC_DEPS \
$VALGRIND_DEPS \
$BASE_DEPS \
$BENCH_DEPS \
$EXAMPLES_DEPS \
$DOC_DEPS \
$TESTS_DEPS \
$PACKAGING_DEPS \
$CODECOV_DEPS \
$COVERITY_DEPS \
$MISC_DEPS \
&& ./install-valgrind.sh ubuntu \
&& ./install-libfabric.sh \
&& ./download-scripts.sh \
&& rm -rf /var/lib/apt/lists/*
# Add user
ENV USER pmdkuser
ENV USERPASS pmdkpass
RUN useradd -m $USER -g sudo -p `mkpasswd $USERPASS`
RUN echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
# switch user
USER $USER
# Set required environment variables
ENV OS ubuntu
ENV OS_VER 19.10
ENV START_SSH_COMMAND service ssh start
ENV PACKAGE_MANAGER dpkg
ENV NOTTY 1
|