]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pmdk/utils/docker/images/Dockerfile.ubuntu-19.10
import ceph 16.2.7
[ceph.git] / ceph / src / pmdk / utils / docker / images / Dockerfile.ubuntu-19.10
diff --git a/ceph/src/pmdk/utils/docker/images/Dockerfile.ubuntu-19.10 b/ceph/src/pmdk/utils/docker/images/Dockerfile.ubuntu-19.10
new file mode 100644 (file)
index 0000000..9b61f89
--- /dev/null
@@ -0,0 +1,121 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright 2016-2020, Intel Corporation
+
+#
+# Dockerfile - a 'recipe' for Docker to build an image of ubuntu-based
+#              environment for building the PMDK project.
+#
+
+# Pull base image
+FROM ubuntu:19.10
+MAINTAINER piotr.balcer@intel.com
+
+ENV DEBIAN_FRONTEND noninteractive
+
+# Additional parameters to build docker without building components
+ARG SKIP_SCRIPTS_DOWNLOAD
+
+# libfabric (optional if libfabric-dev >= 1.4.2 is installed)
+ENV FABRIC_DEPS "autoconf \
+       automake \
+       build-essential \
+       libtool \
+       unzip \
+       wget"
+
+ENV VALGRIND_DEPS "autoconf \
+       automake \
+       build-essential \
+       git"
+
+# pmdk base
+ENV BASE_DEPS "build-essential \
+       git \
+       libdaxctl-dev \
+       libndctl-dev \
+       pkg-config"
+
+# benchmarks (optional)
+ENV BENCH_DEPS libglib2.0-dev
+
+# examples (optional)
+ENV EXAMPLES_DEPS "libfuse-dev \
+       libncurses5-dev \
+       libuv1-dev"
+
+# documentation (optional)
+ENV DOC_DEPS pandoc
+
+# tests
+ENV TESTS_DEPS "bc \
+       gdb \
+       libc6-dbg \
+       libunwind-dev \
+       ndctl \
+       python3 \
+       ssh \
+       strace"
+
+# packaging
+ENV PACKAGING_DEPS "debhelper \
+       devscripts \
+       fakeroot"
+
+# CodeCov
+ENV CODECOV_DEPS curl
+
+# Coverity
+ENV COVERITY_DEPS ruby gcc g++ wget
+
+# misc
+ENV MISC_DEPS "clang \
+       clang-format \
+       flake8 \
+       sudo \
+       whois"
+
+# Copy install valgrind script
+COPY install-valgrind.sh install-valgrind.sh
+
+# Copy install libfabric script
+COPY install-libfabric.sh install-libfabric.sh
+
+# Copy codecov patch and script to download scripts required in run-*.sh
+COPY download-scripts.sh download-scripts.sh
+COPY 0001-fix-generating-gcov-files-and-turn-off-verbose-log.patch \
+       0001-fix-generating-gcov-files-and-turn-off-verbose-log.patch
+
+# Update the Apt cache and install basic tools
+RUN apt-get update && apt-get dist-upgrade -y \
+       && apt-get install -y --no-install-recommends \
+       $FABRIC_DEPS \
+       $VALGRIND_DEPS \
+       $BASE_DEPS \
+       $BENCH_DEPS \
+       $EXAMPLES_DEPS \
+       $DOC_DEPS \
+       $TESTS_DEPS \
+       $PACKAGING_DEPS \
+       $CODECOV_DEPS \
+       $COVERITY_DEPS \
+       $MISC_DEPS \
+       && ./install-valgrind.sh ubuntu \
+       && ./install-libfabric.sh \
+       && ./download-scripts.sh \
+       && rm -rf /var/lib/apt/lists/*
+
+# Add user
+ENV USER pmdkuser
+ENV USERPASS pmdkpass
+RUN useradd -m $USER -g sudo -p `mkpasswd $USERPASS`
+RUN echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
+
+# switch user
+USER $USER
+
+# Set required environment variables
+ENV OS ubuntu
+ENV OS_VER 19.10
+ENV START_SSH_COMMAND service ssh start
+ENV PACKAGE_MANAGER dpkg
+ENV NOTTY 1