-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.opensuse-tumbleweed-latest
83 lines (70 loc) · 1.47 KB
/
Dockerfile.opensuse-tumbleweed-latest
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
#
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2020-2022, Intel Corporation
#
#
# Dockerfile - a 'recipe' for Docker to build an image of environment
# prepared for running tests of librpma.
#
# Pull base image
FROM opensuse/tumbleweed:latest
MAINTAINER [email protected]
# Update the OS
RUN zypper dup -y
# Update all packages
RUN zypper update -y
# base Linux deps
ENV BASE_DEPS "\
clang \
gcc \
git \
make \
pkgconf-pkg-config \
shadow \
sudo \
which"
# librpma library deps
ENV RPMA_DEPS "\
cmake \
file \
groff \
graphviz \
pandoc \
rpm-build \
rdma-core-devel"
# examples deps ('libprotobuf-c-devel' is required only for examples 9 and 9s)
ENV EXAMPLES_DEPS "\
libpmem-devel \
libpmem2-devel \
libprotobuf-c-devel"
# Install all required packages
RUN zypper install -y \
$BASE_DEPS \
$RPMA_DEPS \
$EXAMPLES_DEPS
# 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
# Clean the package cache
RUN zypper clean all
# Add user
ENV USER user
ENV USERPASS p1a2s3s4
ENV PFILE ./password
RUN useradd -m $USER
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
# Set required environment variables
ENV OS opensuse/tumbleweed
ENV OS_VER latest
ENV PACKAGE_MANAGER rpm
ENV NOTTY 1