This repository has been archived by the owner on Sep 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 56
/
Dockerfile.archlinux-latest
103 lines (86 loc) · 1.95 KB
/
Dockerfile.archlinux-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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2020-2023, Intel Corporation
#
#
# Dockerfile - a 'recipe' for Docker to build an image of ubuntu-based
# environment prepared for running tests of librpma.
#
# Pull base image
FROM archlinux:latest
MAINTAINER [email protected]
# Do full system upgrade
RUN pacman -Syu --noconfirm
# base deps
ENV BASE_DEPS "\
clang \
gcc \
git \
make \
pkg-config \
sudo \
which"
ENV EXAMPLES_DEPS "\
m4 \
protobuf-c \
time"
# rdma-core deps
ENV RDMA_DEPS "\
fakeroot \
file"
# PMDK deps
ENV PMDK_DEPS "\
ndctl \
unzip \
wget"
# RPMA deps
ENV RPMA_DEPS "\
cmake \
diffutils \
file \
gawk \
groff \
graphviz \
pandoc"
# Install required packages
RUN pacman -S --noconfirm \
$BASE_DEPS \
$EXAMPLES_DEPS \
$RDMA_DEPS \
$PMDK_DEPS \
$RPMA_DEPS \
&& rm -rf /var/cache/pacman/pkg/*
# 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
# Install PMDK
COPY install-pmdk.sh install-pmdk.sh
RUN ./install-pmdk.sh
# 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 gpasswd wheel -a $USER
# Enable preserving given variables in the privileged environment -
# - it is required by 'makepkg' to download required packages and sources
RUN echo 'Defaults env_keep += "ftp_proxy http_proxy https_proxy no_proxy"' >> /etc/sudoers
RUN echo 'Defaults env_keep += "FTP_PROXY HTTP_PROXY HTTPS_PROXY NO_PROXY"' >> /etc/sudoers
# Install rdma-core and pmdk (requires user 'user')
COPY install-archlinux-aur.sh install-archlinux-aur.sh
RUN ./install-archlinux-aur.sh rdma-core
# Switch to user
USER $USER
# Set required environment variables
ENV OS archlinux
ENV OS_VER latest
ENV PACKAGE_MANAGER none
ENV NOTTY 1