This repository was archived by the owner on Mar 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 76
/
Copy pathDockerfile.archlinux-base-latest
115 lines (97 loc) · 2.25 KB
/
Dockerfile.archlinux-base-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
104
105
106
107
108
109
110
111
112
113
114
115
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2016-2022, Intel Corporation
#
# Dockerfile - a 'recipe' for Docker to build an image of archlinux-based
# environment prepared for running libpmemobj-cpp tests.
#
# Pull base image
FROM registry.hub.docker.com/library/archlinux:base
MAINTAINER igor.chorazewicz@intel.com
# Set required environment variables
ENV OS archlinux-base
ENV OS_VER latest
ENV PACKAGE_MANAGER pacman
ENV NOTTY 1
# Additional parameters to build docker without building components
ARG SKIP_VALGRIND_BUILD
ARG SKIP_PMDK_BUILD
# Base development packages
ARG BASE_DEPS="\
cmake \
gcc \
git \
make"
# Dependencies for compiling libpmemobj-cpp project
ARG LIBPMEMOBJ_CPP_DEPS="\
intel-tbb"
# ndctl's dependencies (optional; ndctl package may be used instead)
ARG NDCTL_DEPS="\
automake \
asciidoc \
bash-completion \
pkg-config \
xmlto"
# PMDK's dependencies (optional; libpmemobj-devel package may be used instead)
ARG PMDK_DEPS="\
autoconf \
automake \
gdb \
python3 \
which"
# pmem's Valgrind dependencies (optional; valgrind package may be used instead)
ARG VALGRIND_DEPS="\
autoconf \
automake"
# Examples (optional)
ARG EXAMPLES_DEPS="\
sfml"
# Documentation (optional)
ARG DOC_DEPS="\
doxygen \
graphviz"
# Tests (optional)
ARG TESTS_DEPS="\
gdb \
libunwind"
# Misc for our builds/CI (optional)
ARG MISC_DEPS="\
clang \
file \
perl-text-diff \
pkg-config \
sudo \
whois"
# Update the pacman cache and install basic tools
RUN pacman -Syu --noconfirm \
&& pacman -S --noconfirm \
${BASE_DEPS} \
${LIBPMEMOBJ_CPP_DEPS} \
${NDCTL_DEPS} \
${PMDK_DEPS} \
${VALGRIND_DEPS} \
${EXAMPLES_DEPS} \
${DOC_DEPS} \
${TESTS_DEPS} \
${MISC_DEPS} \
&& rm -rf /var/cache/pacman/pkg/*
# Install libndctl
COPY install-libndctl.sh install-libndctl.sh
RUN ./install-libndctl.sh
# Install valgrind
COPY install-valgrind.sh install-valgrind.sh
RUN ./install-valgrind.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 \
&& echo $USERPASS > $PFILE \
&& echo $USERPASS >> $PFILE \
&& passwd $USER < $PFILE \
&& rm -f $PFILE \
&& sed -i 's/# %wheel/%wheel/g' /etc/sudoers \
&& gpasswd wheel -a $USER
USER $USER