From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B4AAC43603 for ; Wed, 11 Dec 2019 16:35:46 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id CCE2F214AF for ; Wed, 11 Dec 2019 16:35:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=intel.onmicrosoft.com header.i=@intel.onmicrosoft.com header.b="iwBjQf6k" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CCE2F214AF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AD1EB2C6A; Wed, 11 Dec 2019 17:35:44 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id B74FB91 for ; Wed, 11 Dec 2019 17:35:43 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Dec 2019 08:35:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,301,1571727600"; d="scan'208";a="363659496" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga004.jf.intel.com with ESMTP; 11 Dec 2019 08:35:41 -0800 Received: from fmsmsx125.amr.corp.intel.com (10.18.125.40) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 11 Dec 2019 08:35:41 -0800 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by FMSMSX125.amr.corp.intel.com (10.18.125.40) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 11 Dec 2019 08:35:40 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.177) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 11 Dec 2019 08:35:17 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VQob2y5vaynqvzEpqt5iGDvFDW1MOamEBdBWZoak1a1sx/4ZMaeDaZAMl9gZxQCFZVlYVm4DMvT747rRPMK8uK7H4kb384Iw8fumwHcWvXhV1BGIiw2I6MNzQm58u/6JRZmqs64dYQwrSvkSp430Up0IaYy2YWrjBV+mjs0WzX2oOAcC8EJXM2NFw+IhBuELg1SZXalQt9Habh5Nb+ON/wUM0tFmOgOB/2chKYFmAJ4Im5ukXR8L1oWMophLGvzf06tLqT/gpSoZoMLJLoks2Uc6xazvCSx1yXMQY0a6iJ2ojTQQUzB1oVPApOIoCVAeXdTr14Zl+/Wjyst13EFI0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RFk3DYxSJ6wtrwr6V2ZIyVv8HRYtVLcl6ND/jR+13/M=; b=O+C3zPmWYxTrq5wIsxnpOBs2X+vW8JDKI9sbFdC49OQi6hrL6oSKhpbNfXvFm3nc2D1nwUZBB6ZkZpVg0XidiEFFXzemYno0kn2+DGMNf2OG9uO6eOLRhqdNRdim1iTdUC0VLN1nXRpP037jUMNbonVa/wlpGM4QNEoH04eg6fE43witSQu/gu7NTJSFe3O7IDQF8NnTcE5q4M/sirgLwQWCHhKIqd68EiiahPZjePVMXdSbsFwYzERK3epdVKSvuLiHI2PvZRyVpvi0qsbZk7juZ0losAHC1uY2kJ51mObYi2SpssjBZP7w5WCDvozMldKHzNA3mNMxb3J4QlRS9w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RFk3DYxSJ6wtrwr6V2ZIyVv8HRYtVLcl6ND/jR+13/M=; b=iwBjQf6kxKZeb1PvAuog7yvcT8QUITojfKBVfUrPjDsUTrzfASgPXyXyDmxVFoQiz2Zl92v90SsuJYq4bFImm+OWs6HSQc7otCnJjZg8vScOGbFvBlWl+d83zfR/0phBKE0b+KyAQZ973ORyvHeKJdg6xqD/4fI9zYlwJRtGrvU= Received: from SN6PR11MB2893.namprd11.prod.outlook.com (20.176.241.151) by SN6PR11MB3503.namprd11.prod.outlook.com (52.135.125.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2516.18; Wed, 11 Dec 2019 16:35:01 +0000 Received: from SN6PR11MB2893.namprd11.prod.outlook.com ([fe80::79e3:5e9e:3949:72]) by SN6PR11MB2893.namprd11.prod.outlook.com ([fe80::79e3:5e9e:3949:72%7]) with mapi id 15.20.2538.016; Wed, 11 Dec 2019 16:35:01 +0000 From: "Halim, Abdul" To: "Ruifeng Wang (Arm Technology China)" , "dev@dpdk.org" CC: "Kinsella, Ray" , "yasufum.o@gmail.com" , nd Thread-Topic: [PATCH v5] build: add dockerfile for building docker image Thread-Index: AQHVr2GTRJ4Ni+4r602aOOhXs954Zqe0flsAgACkfVA= Date: Wed, 11 Dec 2019 16:35:00 +0000 Message-ID: References: <1566924290-451677-1-git-send-email-abdul.halim@intel.com> <1575986121-366042-1-git-send-email-abdul.halim@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.2.0.6 dlp-product: dlpe-windows x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNmZjYzMzY2ItYjk3Yy00NzlmLTkyYTYtZWMxYWZmOWFhMGFiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiNnVPdjAxWmlOZVJKWTNiNDQ1YVpCTWpFWExHaGUxVnFoMENBdmIwSjNKbU9DM1BhK0pwZGZEZWhYTUNldzl5SiJ9 authentication-results: spf=none (sender IP is ) smtp.mailfrom=abdul.halim@intel.com; x-originating-ip: [192.198.151.174] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: add7e662-8789-4bd3-5e1f-08d77e581185 x-ms-traffictypediagnostic: SN6PR11MB3503: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 024847EE92 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(366004)(136003)(396003)(39860400002)(376002)(189003)(13464003)(199004)(66946007)(66556008)(66476007)(76116006)(33656002)(64756008)(4326008)(7696005)(316002)(86362001)(186003)(55016002)(9686003)(6506007)(71200400001)(52536014)(5660300002)(66446008)(110136005)(54906003)(2906002)(8676002)(478600001)(8936002)(81166006)(81156014)(53546011)(26005); DIR:OUT; SFP:1102; SCL:1; SRVR:SN6PR11MB3503; H:SN6PR11MB2893.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: qpUAyXaYODS5+kL2d3Inoy7blKeYDSslnMlR/l0Bh96M17lBMlIgRlVdINXRxVkoaA5ypDH5nHL11V3y7Y2zxbZ+GnR/Le/OnkaFNx2YkAB9XAx38ydEaK683nyvXPH94LMHNxMeKhBR94hPsJIPqkIakxPWumn0c70f/WUWZS8jLKt6z8Z5ZXEEwDF5e7ZaZhfC9LiWBt2jhFBB3aOpnCN6voWA4STPc+we7ZAN2gHOywQjBjfO5W1Dbpr4OwLqn9BngLftyJHyjEhbNwwdhxtY9QxQQpTkjPS72o7sBBQmx9uo0gXybVbV1SarkK44i047mkAf7HZ3vHJRA0yLdCc/wjnPVXUwTwF/bk0y18xvLAVpBFaWH9TasjZYSIagUtBzgQUtD4SZPsP7v4FsnWnv7Sck4ND/839+DpNnDA2inj+txZ9fln7j5JcOycxpUXQekMjbpPq4fXUtSe/YVp+S6eqVjMfktbOnf0duVGMIWc6HNSyx0AGAkaGe922v Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: add7e662-8789-4bd3-5e1f-08d77e581185 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Dec 2019 16:35:00.8331 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: +BBxjeuyEyvAA6QXkoCDBOApzGhO/mzIN29K5tujfOz1B8U30RbUzrxDUcrZAGsg1GMi6LDLBvKy547gdfXr8A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3503 X-OriginatorOrg: intel.com Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v5] 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" > -----Original Message----- > From: Ruifeng Wang (Arm Technology China) > Sent: Wednesday, December 11, 2019 6:45 AM > To: Halim, Abdul ; dev@dpdk.org > Cc: Kinsella, Ray ; yasufum.o@gmail.com; nd > > Subject: RE: [PATCH v5] build: add dockerfile for building docker image > = > = > > -----Original Message----- > > From: Abdul Halim > > Sent: Tuesday, December 10, 2019 21:55 > > To: dev@dpdk.org > > Cc: ray.kinsella@intel.com; yasufum.o@gmail.com; Ruifeng Wang (Arm > > Technology China) ; Abdul Halim > > > > Subject: [PATCH v5] build: add dockerfile for building docker image > > > > 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 > > > > --- > > > > v2: > > * renamed Dockerfile name from Dockerfile.ubuntu to Dockerfile.bionic > > * added call to ldconfig to update cache of libraries to include newly > > installed DPDK libs > > > > --- > > > > v3: > > * added example use-case of dpdk dockerfile in extras/README.md > > > > --- > > v4: > > * changed meson build to use tmp dir in docker build > > * changed sample app dockerfile to add only helloworld source code > > > > --- > > v5: > > * fix whitespace error > > --- > > extras/Dockerfile.bionic | 40 > > +++++++++++++++++++++++++++++++++++++ > > extras/README.md | 51 > > ++++++++++++++++++++++++++++++++++++++++++++++++ > > 2 files changed, 91 insertions(+) > > create mode 100644 extras/Dockerfile.bionic create mode 100644 > > extras/README.md > > > > diff --git a/extras/Dockerfile.bionic b/extras/Dockerfile.bionic new > > file mode > > 100644 index 0000000..cf9c176 > > --- /dev/null > > +++ b/extras/Dockerfile.bionic > > @@ -0,0 +1,40 @@ > > +# 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 \ > > + pkg-config \ > > + python3 \ > > + python3-pip \ > > + ninja-build \ > > + libjansson-dev \ > > + libbsd-dev \ > > + libnuma-dev \ > > + libssl-dev \ > > + zlib1g-dev \ > > + libpcap-dev \ > > + libibverbs-dev \ > > + && pip3 install meson \ > > + && apt-get clean && rm -rf /var/lib/apt/lists/* > > + > > +ADD . /tmp/dpdk > > + > > +WORKDIR /tmp/dpdk > > + > > +RUN meson /tmp/dpdk-build \ > > + -Ddefault_library=3Dshared \ > > + -Dmachine=3Ddefault \ > > + -Dper_library_versions=3Dfalse \ > > + && ninja -C /tmp/dpdk-build install \ > > + && ldconfig \ > > + && cd /; rm -rf /tmp/dpdk > = > You may want to rm /tmp/dpdk-build as well. Sure, I'll update the patch. > = > Regards, > /Ruifeng > > + > > +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..8001012 > > --- /dev/null > > +++ b/extras/README.md > > @@ -0,0 +1,51 @@ > > +# Build DPDK Docker image > > + > > +To build a docker image run the following command from dpdk root > > directory. > > + > > +``` > > +DOCKER_TAG=3D"dpdk" > > +docker build -t ${DOCKER_TAG} -f extras/Dockerfile.bionic . > > +``` > > + > > +# Example of how to use this dpdk library image > > + > > +The following steps shows how to use the dpdk shared library > > +container to build and run a dpdk application without having to build > > +dpdk library for each application. > > + > > +## Create a dpdk sample app docker file with 'dpdk' as the base image > > + > > +Create a docker file to build the helloworld application from > > +example/helloworld source files in dpdk root directory. > > + > > +``` > > +cat << EOF > Dockerfile.dpdkSampleApp FROM dpdk > > + > > +ADD examples/helloworld /opt/examples/helloworld > > + > > +WORKDIR /opt/examples/helloworld > > +RUN make && cp build/helloworld-shared /usr/local/bin/helloworld EOF > > +``` > > + > > +## Build sample app docker image > > + > > +``` > > +DOCKERAPP_TAG=3D"dpdk-helloworld" > > +docker build -t ${DOCKERAPP_TAG} -f Dockerfile.dpdkSampleApp . > > +``` > > + > > +This sample app now can be run like any other applicaiton in a docker > > container. > > + > > +``` > > +$ docker run --rm --privileged -it -v /dev/hugepages:/dev/hugepages > > +dpdk-helloworld ``` > > + > > +## Running the sample app > > +Once inside the container run helloword binary > > + > > +``` > > +$ root@11233ed2e69c # helloworld > > +``` > > + > > -- > > 1.8.3.1 > > > > -------------------------------------------------------------- > > Intel Research and Development Ireland Limited Registered in Ireland > > Registered Office: Collinstown Industrial Park, Leixlip, County > > Kildare Registered Number: 308263 > > > > > > This e-mail and any attachments may contain confidential material for > > the sole use of the intended recipient(s). Any review or distribution > > by others is strictly prohibited. If you are not the intended > > recipient, please contact the sender and delete all copies. -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the s= ole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact = the sender and delete all copies.