-
Notifications
You must be signed in to change notification settings - Fork 510
/
Dockerfile.opensuse-leap-15
119 lines (102 loc) · 2.18 KB
/
Dockerfile.opensuse-leap-15
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
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2016-2024, Intel Corporation
#
# Dockerfile - a 'recipe' for Docker to build an image of openSUSE-based
# environment for building the PMDK project.
#
# Pull base image
FROM docker.io/opensuse/leap:15.6@sha256:d3a517b66067d9f150dbd57d7ad28e0806025ad6f3a3e8c71b09cc7230b833a6
MAINTAINER tomasz.gromadzki@intel.com
# Set required environment variables
ENV OS opensuse/leap
ENV OS_VER 15
ENV PACKAGE_MANAGER rpm
ENV NOTTY 1
ENV LD_LIBRARY_PATH /usr/lib:$LD_LIBRARY_PATH
ENV PKG_CONFIG_PATH /usr/lib/pkgconfig:$PKG_CONFIG_PATH
# PMDK basic dependencies
ENV BASE_DEPS "\
gcc \
gcc-c++ \
git \
libndctl-devel \
make \
pkg-config \
systemd"
# Valgrind dependencies
ENV VALGRIND_DEPS "\
autoconf \
automake \
file \
findutils \
git"
# benchmarks dependencies (optional)
ENV BENCH_DEPS "\
glib2-devel"
# examples dependencies (optional)
ENV EXAMPLES_DEPS "\
fuse \
fuse-devel \
ncurses-devel \
libuv-devel"
# documentation dependencies (optional)
ENV DOC_DEPS "\
pandoc"
# tests dependencies
ENV TESTS_DEPS "\
bc \
gdb \
libunwind-devel \
ndctl \
strace"
# packaging dependencies
ENV PACKAGING_DEPS "\
fdupes \
rpm-build \
rpmdevtools"
# miscellaneous dependencies (mostly for CI)
ENV MISC_DEPS "\
clang \
hub \
lbzip2 \
man \
python3-flake8 \
python3-pip \
rsync \
sudo \
tar \
which \
xmlto"
# python scripts dependencies
ENV PYTHON_DEPS "\
distro \
xmlrunner"
# Copy install valgrind script
COPY install-valgrind.sh install-valgrind.sh
# add openSUSE Leap 15.4 Oss repo
RUN zypper ar -f http://download.opensuse.org/distribution/leap/15.4/repo/oss/ oss
RUN zypper update -y && zypper install -y \
$BASE_DEPS \
$VALGRIND_DEPS \
$BENCH_DEPS \
$EXAMPLES_DEPS \
$DOC_DEPS \
$TESTS_DEPS \
$PACKAGING_DEPS \
$MISC_DEPS \
&& ./install-valgrind.sh fedora \
&& zypper clean all
RUN pip3 install $PYTHON_DEPS
# Add and switch user
ENV USER pmdkuser
ENV USERPASS pmdkpass
RUN useradd -m $USER
ENV PFILE ./password
RUN echo $USERPASS > $PFILE
RUN echo $USERPASS >> $PFILE
RUN passwd $USER < $PFILE
RUN rm -f $PFILE
RUN sed -i 's/# %wheel/%wheel/g' /etc/sudoers
RUN groupadd wheel
RUN gpasswd wheel -a $USER
USER $USER