# SPDX-License-Identifier: BSD-3-Clause # Copyright 2016-2023, Intel Corporation # # Dockerfile - a 'recipe' for Docker to build an image of fedora-based # environment for building the PMDK project. # # Pull base image FROM fedora:37 MAINTAINER tomasz.gromadzki@intel.com # Set required environment variables ENV OS fedora ENV OS_VER 37 ENV PACKAGE_MANAGER rpm ENV NOTTY 1 # PMDK basic dependencies ENV BASE_DEPS "\ cmake \ git \ daxctl-devel \ make \ ndctl-devel \ pkgconfig" # Valgrind dependencies ENV VALGRIND_DEPS "\ autoconf \ automake \ file \ findutils \ git" # benchmarks dependencies (optional) ENV BENCH_DEPS "\ glib2-devel" # examples dependencies (optional) ENV EXAMPLES_DEPS "\ fuse \ fuse-devel \ ncurses-devel \ libuv-devel" # documentation dependencies (optional) ENV DOC_DEPS "\ pandoc" # tests dependencies ENV TESTS_DEPS "\ bc \ gdb \ libunwind-devel \ ndctl \ openssh-server \ python3 \ strace" # packaging dependencies ENV PACKAGING_DEPS "\ rpm-build \ rpm-build-libs \ rpmdevtools" # miscellaneous dependencies (mostly for CI) ENV MISC_DEPS "\ clang \ hub \ lbzip2 \ man \ python3-flake8 \ python3-pip \ rsync \ shadow-utils \ sudo \ tar \ which \ xmlto" # python scripts dependencies ENV PYTHON_DEPS "\ distro \ xmlrunner" # Copy install valgrind script COPY install-valgrind.sh install-valgrind.sh RUN dnf update -y && dnf install -y \ $BASE_DEPS \ $VALGRIND_DEPS \ $BENCH_DEPS \ $EXAMPLES_DEPS \ $DOC_DEPS \ $TESTS_DEPS \ $PACKAGING_DEPS \ $MISC_DEPS \ && ./install-valgrind.sh fedora \ && dnf clean all RUN pip3 install $PYTHON_DEPS # Add and switch user ENV USER pmdkuser ENV USERPASS pmdkpass RUN useradd -m $USER RUN echo "$USER:$USERPASS" | chpasswd RUN gpasswd wheel -a $USER RUN echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers USER $USER