Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

Commit 78b9a3c

Browse files
Merge pull request #1059 from lukaszstolarczuk/clean-docker-images
Clean docker images
2 parents 2d0c864 + 03ef46c commit 78b9a3c

16 files changed

Lines changed: 431 additions & 283 deletions

.github/workflows/other_OSes.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ jobs:
3232
"OS=debian OS_VER=unstable",
3333
"OS=debian OS_VER=latest",
3434
"OS=fedora OS_VER=33",
35-
"OS=fedora OS_VER=rawhide PUSH_IMAGE=0",
36-
"TYPE=package OS=fedora OS_VER=rawhide",
35+
"TYPE=package OS=fedora OS_VER=33 PUSH_IMAGE=0",
36+
"OS=fedora OS_VER=rawhide TESTS_PMREORDER=0",
3737
"OS=opensuse-leap OS_VER=latest",
3838
"OS=opensuse-tumbleweed OS_VER=latest",
3939
"OS=ubuntu OS_VER=18.04",

tests/ctest_helpers.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-License-Identifier: BSD-3-Clause
2-
# Copyright 2018-2020, Intel Corporation
2+
# Copyright 2018-2021, Intel Corporation
33

44
#
55
# ctest_helpers.cmake - helper functions for tests/CMakeLists.txt
@@ -58,7 +58,7 @@ function(find_packages)
5858

5959
# XXX: if pmreorder not supported (e.g. on Win) - print one message "tests will be skipped"
6060
if(NOT WIN32)
61-
if(VALGRIND_FOUND AND TESTS_PMREORDER)
61+
if(VALGRIND_FOUND AND VALGRIND_PMEMCHECK_FOUND AND TESTS_PMREORDER)
6262
if((NOT(PMEMCHECK_VERSION LESS 1.0)) AND PMEMCHECK_VERSION LESS 2.0)
6363
find_program(PMREORDER names pmreorder HINTS ${LIBPMEMOBJ_PREFIX}/bin)
6464
get_program_version_major_minor(${PMREORDER} PMREORDER_VERSION)

utils/docker/images/Dockerfile.archlinux-base-latest

Lines changed: 67 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -20,35 +20,74 @@ ENV NOTTY 1
2020
ARG SKIP_VALGRIND_BUILD
2121
ARG SKIP_PMDK_BUILD
2222

23-
# Update the Apt cache and install basic tools
24-
RUN pacman -Syu --noconfirm
25-
RUN pacman -S --noconfirm \
23+
# Base development packages
24+
ARG BASE_DEPS="\
25+
cmake \
26+
gcc \
27+
git \
28+
make"
29+
30+
# Dependencies for compiling libpmemobj-cpp project
31+
ARG LIBPMEMOBJ_CPP_DEPS="\
32+
intel-tbb"
33+
34+
# ndctl's dependencies (optional; ndctl-devel & daxctl-devel may be used instead)
35+
ARG NDCTL_DEPS="\
36+
automake \
2637
asciidoc \
38+
bash-completion \
39+
pkg-config \
40+
xmlto"
41+
42+
# PMDK's dependencies (optional; libpmemobj-devel package may be used instead)
43+
ARG PMDK_DEPS="\
2744
autoconf \
2845
automake \
29-
bash-completion \
30-
clang \
31-
cmake \
46+
gdb \
47+
python3 \
48+
which"
49+
50+
# pmem's Valgrind (optional; valgrind package may be used instead)
51+
ARG VALGRIND_DEPS="\
52+
autoconf \
53+
automake"
54+
55+
# Examples (optional)
56+
ARG EXAMPLES_DEPS="\
57+
sfml"
58+
59+
# Documentation (optional)
60+
ARG DOC_DEPS="\
3261
doxygen \
33-
file \
34-
gcc \
62+
graphviz"
63+
64+
# Tests (optional)
65+
ARG TESTS_DEPS="\
3566
gdb \
36-
git \
37-
graphviz \
38-
sfml \
39-
intel-tbb \
40-
libunwind \
41-
llvm \
42-
make \
43-
pandoc \
67+
libunwind"
68+
69+
# Misc for our builds/CI (optional)
70+
ARG MISC_DEPS="\
71+
clang \
72+
file \
4473
perl-text-diff \
4574
pkg-config \
46-
ruby \
4775
sudo \
48-
wget \
49-
which \
50-
whois \
51-
xmlto
76+
whois"
77+
78+
# Update the Apt cache and install basic tools
79+
RUN pacman -Syu --noconfirm \
80+
&& pacman -S --noconfirm \
81+
${BASE_DEPS} \
82+
${LIBPMEMOBJ_CPP_DEPS} \
83+
${NDCTL_DEPS} \
84+
${PMDK_DEPS} \
85+
${VALGRIND_DEPS} \
86+
${EXAMPLES_DEPS} \
87+
${DOC_DEPS} \
88+
${TESTS_DEPS} \
89+
${MISC_DEPS} \
90+
&& rm -rf /var/cache/pacman/pkg/*
5291

5392
# Install libndctl
5493
COPY install-libndctl.sh install-libndctl.sh
@@ -66,14 +105,11 @@ RUN ./install-pmdk.sh
66105
ENV USER user
67106
ENV USERPASS p1a2s3s4
68107
ENV PFILE ./password
69-
RUN useradd -m $USER
70-
RUN echo $USERPASS > $PFILE
71-
RUN echo $USERPASS >> $PFILE
72-
RUN passwd $USER < $PFILE
73-
RUN rm -f $PFILE
74-
RUN sed -i 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' /etc/sudoers
75-
RUN gpasswd wheel -a $USER
108+
RUN useradd -m $USER \
109+
&& echo $USERPASS > $PFILE \
110+
&& echo $USERPASS >> $PFILE \
111+
&& passwd $USER < $PFILE \
112+
&& rm -f $PFILE \
113+
&& sed -i 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' /etc/sudoers \
114+
&& gpasswd wheel -a $USER
76115
USER $USER
77-
78-
# Clean the cache of packages
79-
RUN rm -rf /var/cache/pacman/pkg/*

utils/docker/images/Dockerfile.centos-8

Lines changed: 60 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -20,51 +20,75 @@ ENV NOTTY 1
2020
ARG SKIP_VALGRIND_BUILD
2121
ARG SKIP_PMDK_BUILD
2222

23-
RUN dnf update -y
24-
RUN dnf install -y epel-release
25-
RUN dnf install -y 'dnf-command(config-manager)'
26-
RUN dnf config-manager --set-enabled powertools
23+
# Base development packages
24+
ARG BASE_DEPS="\
25+
cmake \
26+
gcc \
27+
gcc-c++ \
28+
git \
29+
make"
2730

28-
# Install basic tools
29-
RUN dnf update -y \
30-
&& dnf install -y \
31-
asciidoc \
31+
# Dependencies for compiling libpmemobj-cpp project
32+
ARG LIBPMEMOBJ_CPP_DEPS="\
33+
libatomic \
34+
tbb-devel"
35+
36+
# PMDK's dependencies (optional; libpmemobj-devel package may be used instead)
37+
ARG PMDK_DEPS="\
3238
autoconf \
3339
automake \
34-
bash-completion \
35-
clang \
36-
cmake \
3740
daxctl-devel \
38-
doxygen \
39-
gcc \
4041
gdb \
41-
git \
42-
json-c-devel \
43-
keyutils-libs-devel \
44-
kmod-devel \
45-
libatomic \
46-
libtool \
47-
libudev-devel \
48-
libunwind-devel \
49-
libuuid-devel \
50-
make \
5142
man \
52-
ncurses-devel \
5343
ndctl-devel \
54-
open-sans-fonts \
5544
pandoc \
56-
passwd \
57-
perl-Text-Diff \
5845
python3 \
5946
rpm-build \
6047
rpm-build-libs \
6148
rpmdevtools \
62-
sudo \
63-
tar \
64-
tbb-devel \
65-
wget \
66-
which \
67-
xmlto \
49+
which"
50+
51+
# pmem's Valgrind (optional; valgrind-devel may be used instead)
52+
ARG VALGRIND_DEPS="\
53+
autoconf \
54+
automake"
55+
56+
# Examples (optional)
57+
ARG EXAMPLES_DEPS="\
58+
ncurses-devel"
59+
60+
# Documentation (optional)
61+
ARG DOC_DEPS="\
62+
doxygen"
63+
64+
# Tests (optional)
65+
ARG TESTS_DEPS="\
66+
gdb \
67+
libunwind-devel"
68+
69+
# Misc for our builds/CI (optional)
70+
ARG MISC_DEPS="\
71+
clang \
72+
passwd \
73+
perl-Text-Diff \
74+
pkgconf \
75+
sudo"
76+
77+
# Update package repository, extend dnf's package base and install basic tools
78+
RUN dnf update -y \
79+
&& dnf install -y epel-release \
80+
&& dnf install -y 'dnf-command(config-manager)' \
81+
&& dnf config-manager --set-enabled powertools \
82+
&& dnf update -y \
83+
&& dnf install -y \
84+
${BASE_DEPS} \
85+
${LIBPMEMOBJ_CPP_DEPS} \
86+
${PMDK_DEPS} \
87+
${VALGRIND_DEPS} \
88+
${EXAMPLES_DEPS} \
89+
${DOC_DEPS} \
90+
${TESTS_DEPS} \
91+
${MISC_DEPS} \
6892
&& dnf clean all
6993

7094
# Install valgrind
@@ -78,7 +102,7 @@ RUN ./install-pmdk.sh rpm
78102
# Add user
79103
ENV USER user
80104
ENV USERPASS pass
81-
RUN useradd -m $USER
82-
RUN echo $USERPASS | passwd $USER --stdin
83-
RUN gpasswd wheel -a $USER
105+
RUN useradd -m $USER \
106+
&& echo $USERPASS | passwd $USER --stdin \
107+
&& gpasswd wheel -a $USER
84108
USER $USER

utils/docker/images/Dockerfile.debian-latest

Lines changed: 54 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -20,43 +20,70 @@ ENV NOTTY 1
2020
ARG SKIP_VALGRIND_BUILD
2121
ARG SKIP_PMDK_BUILD
2222

23-
ENV DEBIAN_FRONTEND noninteractive
23+
# Base development packages
24+
ARG BASE_DEPS="\
25+
cmake \
26+
gcc \
27+
git"
2428

25-
# Update the Apt cache and install basic tools
26-
RUN apt-get update \
27-
&& apt-get install -y software-properties-common \
28-
asciidoc \
29+
# Dependencies for compiling libpmemobj-cpp project
30+
ARG LIBPMEMOBJ_CPP_DEPS="\
31+
libatomic1 \
32+
libtbb-dev"
33+
34+
# PMDK's dependencies (optional; libpmemobj-devel package may be used instead)
35+
ARG PMDK_DEPS="\
2936
autoconf \
30-
clang \
31-
clang-format \
32-
cmake \
33-
curl \
37+
automake \
3438
debhelper \
3539
devscripts \
36-
doxygen \
37-
gcc \
3840
gdb \
39-
git \
40-
graphviz \
4141
libdaxctl-dev \
42-
libjson-c-dev \
43-
libkmod-dev \
44-
libncurses5-dev \
4542
libndctl-dev \
46-
libsfml-dev \
47-
libtbb-dev \
48-
libtext-diff-perl \
49-
libudev-dev \
50-
libunwind-dev \
51-
llvm \
5243
pandoc \
44+
python3"
45+
46+
# pmem's Valgrind (optional; valgrind may be used instead)
47+
ARG VALGRIND_DEPS="\
48+
autoconf \
49+
automake"
50+
51+
# Examples (optional)
52+
ARG EXAMPLES_DEPS="\
53+
libncurses5-dev \
54+
libsfml-dev"
55+
56+
# Documentation (optional)
57+
ARG DOC_DEPS="\
58+
doxygen \
59+
graphviz"
60+
61+
# Tests (optional)
62+
ARG TESTS_DEPS="\
63+
gdb \
64+
libunwind-dev"
65+
66+
# Misc for our builds/CI (optional)
67+
ARG MISC_DEPS="\
68+
clang \
69+
libtext-diff-perl \
5370
pkg-config \
54-
ruby \
5571
sudo \
56-
tzdata \
57-
uuid-dev \
58-
wget \
59-
whois \
72+
whois"
73+
74+
ENV DEBIAN_FRONTEND noninteractive
75+
76+
# Update the Apt cache and install basic tools
77+
RUN apt-get update \
78+
&& apt-get install -y software-properties-common \
79+
${BASE_DEPS} \
80+
${LIBPMEMOBJ_CPP_DEPS} \
81+
${PMDK_DEPS} \
82+
${VALGRIND_DEPS} \
83+
${EXAMPLES_DEPS} \
84+
${DOC_DEPS} \
85+
${TESTS_DEPS} \
86+
${MISC_DEPS} \
6087
&& rm -rf /var/lib/apt/lists/*
6188

6289
# Install valgrind

0 commit comments

Comments
 (0)