Debian Codegraph @

utils/docker/images/Dockerfile.fedora-31

raw
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright 2016-2023, Intel Corporation
3
4 #
5 # Dockerfile - a 'recipe' for Docker to build an image of fedora-based
6 # environment for building the PMDK project.
7 #
8
9 # Pull base image
10 FROM fedora:31
11 MAINTAINER [email protected]
12
13 # Set required environment variables
14 ENV OS fedora
15 ENV OS_VER 31
16 ENV PACKAGE_MANAGER rpm
17 ENV NOTTY 1
18
19 # PMDK basic dependencies
20 ENV BASE_DEPS "\
21 cmake \
22 git \
23 daxctl-devel \
24 make \
25 ndctl-devel \
26 pkgconfig"
27
28 # Valgrind dependencies
29 ENV VALGRIND_DEPS "\
30 autoconf \
31 automake \
32 file \
33 findutils \
34 git"
35
36 # benchmarks dependencies (optional)
37 ENV BENCH_DEPS "\
38 glib2-devel"
39
40 # examples dependencies (optional)
41 ENV EXAMPLES_DEPS "\
42 fuse \
43 fuse-devel \
44 ncurses-devel \
45 libuv-devel"
46
47 # documentation dependencies (optional)
48 ENV DOC_DEPS "\
49 pandoc"
50
51 # tests dependencies
52 ENV TESTS_DEPS "\
53 bc \
54 gdb \
55 libunwind-devel \
56 ndctl \
57 openssh-server \
58 strace"
59
60 # packaging dependencies
61 ENV PACKAGING_DEPS "\
62 rpm-build \
63 rpm-build-libs \
64 rpmdevtools"
65
66 # miscellaneous dependencies (mostly for CI)
67 ENV MISC_DEPS "\
68 clang \
69 lbzip2 \
70 man \
71 python3-flake8 \
72 rsync \
73 shadow-utils \
74 sudo \
75 tar \
76 which \
77 xmlto"
78
79 # Copy install valgrind script
80 COPY install-valgrind.sh install-valgrind.sh
81
82 RUN dnf update -y && dnf install -y \
83 $BASE_DEPS \
84 $VALGRIND_DEPS \
85 $BENCH_DEPS \
86 $EXAMPLES_DEPS \
87 $DOC_DEPS \
88 $TESTS_DEPS \
89 $PACKAGING_DEPS \
90 $MISC_DEPS \
91 && ./install-valgrind.sh fedora \
92 && dnf clean all
93
94 # Add and switch user
95 ENV USER pmdkuser
96 ENV USERPASS pmdkpass
97 RUN useradd -m $USER
98 RUN echo "$USER:$USERPASS" | chpasswd
99 RUN gpasswd wheel -a $USER
100 RUN echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
101 USER $USER