summaryrefslogtreecommitdiffstats
path: root/src/pmdk/utils/docker/images/Dockerfile.fedora-31
blob: a699fee855caadd8d7051ba6d31fb31d0a07f8ef (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
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2016-2020, Intel Corporation

#
# Dockerfile - a 'recipe' for Docker to build an image of fedora-based
#              environment for building the PMDK project.
#

# Pull base image
FROM fedora:31
MAINTAINER piotr.balcer@intel.com

# libfabric (optional if libfabric-dev >= 1.4.2 is installed)
ENV FABRIC_DEPS "\
	autoconf \
	automake \
	libtool \
	wget"

ENV VALGRIND_DEPS "\
	autoconf \
	automake \
	file \
	findutils \
	git"

# pmdk base
ENV BASE_DEPS "\
	git \
	daxctl-devel \
	make \
	ndctl-devel \
	pkgconfig"

# benchmarks (optional)
ENV BENCH_DEPS "\
	glib2-devel"

# examples (optional)
ENV EXAMPLES_DEPS "\
	fuse \
	fuse-devel \
	ncurses-devel \
	libuv-devel"

# documentation (optional)
ENV DOC_DEPS "\
	pandoc"

# tests
ENV TESTS_DEPS "\
	bc \
	gdb \
	libunwind-devel \
	ndctl \
	openssh-server \
	strace"

# packaging
ENV PACKAGING_DEPS "\
	rpm-build \
	rpm-build-libs \
	rpmdevtools"

# Coverity
ENV COVERITY_DEPS "\
	gcc \
	wget"

# misc
ENV MISC_DEPS "\
	clang \
	hub \
	lbzip2 \
	man \
	python3-flake8 \
	rsync \
	shadow-utils \
	sudo \
	tar \
	which \
	xmlto"

# Copy install valgrind script
COPY install-valgrind.sh install-valgrind.sh

# Copy install libfabric script
COPY install-libfabric.sh install-libfabric.sh

RUN dnf update -y && dnf install -y \
	$FABRIC_DEPS \
	$VALGRIND_DEPS \
	$BASE_DEPS \
	$BENCH_DEPS \
	$EXAMPLES_DEPS \
	$DOC_DEPS \
	$TESTS_DEPS \
	$PACKAGING_DEPS \
	$COVERITY_DEPS \
	$MISC_DEPS \
	$TESTS_DEPS \
	&& ./install-valgrind.sh fedora \
	&& ./install-libfabric.sh fedora \
	&& dnf clean all

# Add user
ENV USER pmdkuser
ENV USERPASS pmdkpass
RUN useradd -m $USER
RUN echo "$USER:$USERPASS" | chpasswd
RUN gpasswd wheel -a $USER
RUN echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
USER $USER

# Set required environment variables
ENV OS fedora
ENV OS_VER 31
ENV START_SSH_COMMAND /usr/sbin/sshd
ENV PACKAGE_MANAGER rpm
ENV NOTTY 1