From patchwork Tue Aug 27 16:44:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abdul Halim X-Patchwork-Id: 58095 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 77EEA1C0D7; Tue, 27 Aug 2019 18:45:04 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 946E81C023 for ; Tue, 27 Aug 2019 18:45:02 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Aug 2019 09:45:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,437,1559545200"; d="scan'208";a="331877932" Received: from silpixa00399119.ir.intel.com (HELO silpixa00399119.ger.corp.intel.com) ([10.237.222.73]) by orsmga004.jf.intel.com with ESMTP; 27 Aug 2019 09:44:59 -0700 From: Abdul Halim To: dev@dpdk.org Cc: Abdul Halim Date: Tue, 27 Aug 2019 17:44:50 +0100 Message-Id: <1566924290-451677-1-git-send-email-abdul.halim@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH] build: add dockerfile for building docker image X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Adding a Dockerfile with Ubuntu bionic base image to build dpdk as shared library. This docker image could be used as base image to build and run dpdk applications in containers. Signed-off-by: Abdul Halim --- extras/Dockerfile.ubuntu | 38 ++++++++++++++++++++++++++++++++++++++ extras/README.md | 8 ++++++++ 2 files changed, 46 insertions(+) create mode 100644 extras/Dockerfile.ubuntu create mode 100644 extras/README.md diff --git a/extras/Dockerfile.ubuntu b/extras/Dockerfile.ubuntu new file mode 100644 index 0000000..3d5b36b --- /dev/null +++ b/extras/Dockerfile.ubuntu @@ -0,0 +1,38 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2019 Intel Corporation +FROM ubuntu:bionic + +# install requirements for getting and building DPDK +# including dependencies for DPDK features +RUN apt-get update && apt-get install -y \ + build-essential \ + pkgconf \ + python3 \ + python3-pip \ + ninja-build \ + libjansson-dev \ + libbsd-dev \ + libnuma-dev \ + libssl-dev \ + zlib1g-dev \ + libpcap-dev \ + libibverbs-dev \ + && pip3 install meson + +ADD . /tmp/dpdk + +WORKDIR /tmp/dpdk + +RUN meson build \ + -Ddefault_library=shared \ + -Dmachine=default \ + -Dper_library_versions=false \ + && ninja -C build install \ + && cd /; rm -rf /tmp/dpdk + +WORKDIR / + +# Installed DPDK Shared library location: +# lib dir : /usr/local/lib/ +# include : /usr/local/include/ +# pkgconfig file: /usr/local/lib/x86_64-linux-gnu/pkgconfig/libdpdk.pc diff --git a/extras/README.md b/extras/README.md new file mode 100644 index 0000000..967ddf7 --- /dev/null +++ b/extras/README.md @@ -0,0 +1,8 @@ +# Build DPDK Docker image + +To build a docker image run the following command from dpdk root directory. + +``` +DOCKER_TAG="dpdk" +docker build -t ${DOCKER_TAG} -f extras/Dockerfile.ubuntu . +```