-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.centos-stream
77 lines (66 loc) · 1.44 KB
/
Dockerfile.centos-stream
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
#
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2020-2022, Intel Corporation
#
#
# Dockerfile - a 'recipe' for Docker to build an image of fedora-based
# environment prepared for running tests of librpma.
#
# Pull base image
# There is NO official docker image of CentOS Stream, so we use tgagor/centos-stream.
FROM tgagor/centos:stream
MAINTAINER [email protected]
RUN dnf update -y
RUN dnf install -y epel-release
RUN dnf install -y 'dnf-command(config-manager)'
RUN dnf config-manager --set-enabled powertools
# base Linux deps
ENV BASE_DEPS "\
clang \
gcc \
git \
make \
passwd \
pkg-config \
rpm-build \
sudo \
which"
# librpma library deps
ENV RPMA_DEPS "\
cmake \
diffutils \
file \
gawk \
groff \
graphviz \
pandoc \
rdma-core-devel"
# examples deps ('protobuf-c-devel' is required only for examples 9 and 9s)
ENV EXAMPLES_DEPS "\
libpmem \
libpmem2 \
protobuf-c-devel"
# Install all required packages
RUN dnf install -y \
$BASE_DEPS \
$RPMA_DEPS \
$EXAMPLES_DEPS \
&& dnf clean all
# Install cmocka
COPY install-cmocka.sh install-cmocka.sh
RUN ./install-cmocka.sh
# Install txt2man
COPY install-txt2man.sh install-txt2man.sh
RUN ./install-txt2man.sh
# Add user
ENV USER user
ENV USERPASS p1a2s3s4
RUN useradd -m $USER
RUN echo $USERPASS | passwd $USER --stdin
RUN gpasswd wheel -a $USER
USER $USER
# Set required environment variables
ENV OS centos
ENV OS_VER stream
ENV PACKAGE_MANAGER rpm
ENV NOTTY 1