From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 084EAA04F1; Wed, 11 Dec 2019 07:45:35 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 30BEE2C6A; Wed, 11 Dec 2019 07:45:35 +0100 (CET) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10057.outbound.protection.outlook.com [40.107.1.57]) by dpdk.org (Postfix) with ESMTP id 8098F91 for ; Wed, 11 Dec 2019 07:45:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=p9uiYaMQ3fHs3uZf4bVOH57G10MAASEl/i4LnwrzyDQ=; b=WwiJkEyrSH2hF70GyZkNxRdHa2cn1jDfCfLCO78Fj3P8pD4mMcmvj86tImCldSkD1uur0V9w4tZ0Aze/AZN884KKg/3MUEdSiA10rz3gv9UtOFGxRg659LXE+xhJKCCZ9BSuaQm0ELOIYAJ9I9ZgUQ3qdVO1+e/7W9NcqM+eI1o= Received: from AM4PR08CA0052.eurprd08.prod.outlook.com (2603:10a6:205:2::23) by DB6PR0802MB2519.eurprd08.prod.outlook.com (2603:10a6:4:a0::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2516.17; Wed, 11 Dec 2019 06:45:31 +0000 Received: from DB5EUR03FT056.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::200) by AM4PR08CA0052.outlook.office365.com (2603:10a6:205:2::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.15 via Frontend Transport; Wed, 11 Dec 2019 06:45:31 +0000 Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT056.mail.protection.outlook.com (10.152.21.124) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.18 via Frontend Transport; Wed, 11 Dec 2019 06:45:31 +0000 Received: ("Tessian outbound 25173d5f5683:v37"); Wed, 11 Dec 2019 06:45:31 +0000 X-CR-MTA-TID: 64aa7808 Received: from 2fc366653f28.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D8328018-F0D1-4C39-BDBC-D6243B22554A.1; Wed, 11 Dec 2019 06:45:26 +0000 Received: from EUR01-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 2fc366653f28.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 11 Dec 2019 06:45:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VMCjTQyYRReE6xqurlPTNT9QpdRvgwS9jfOMuNR9PKE3KAKLPLomdiELliqKOjEiBDHhll4vK3AWfRjxf6J8eeWIelJd7bSC21WBFBkFY0MkbPx7tuEuI7SeAmttvLS/phf461dXpZlivMIfP7cmgzU0ZF2CxYHpkiXKKMAwg46U7zjXduYfWE9Kc9hb+pN3h0XOBuugqvT6y4iWe3mym8rAFl+BWQwpLqB1NKq0xwsf/0SdkDd/uKXAM9HA8DjqdwgieUHgWjERdPtvMKSIAAUzcH7+zY3LMn+kqNDJWIFZnZEDrmbmC+9y0Enee10lEfC/SIDZsM1EUfeB+PzHEw== 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=p9uiYaMQ3fHs3uZf4bVOH57G10MAASEl/i4LnwrzyDQ=; b=St36ibGmcBuZM9RaKYdadIILGO/YobpfArZ0q5T7j2ZgmmCw0qWmgMhAVLTD8PFeL51snwfRCquYi9RpEBAZ0QqYU/qzzGhVlSjZoJ1i+lxvMYN/dLtr9o/zv0VYtzAp/78dlEhTfX/3EFpHIs4qM5y4PGhu9coNCX94AGgnc53Cz1L6ZA7aTtviOtghKKGoDdQ1D0vVXQJwJ1bzcC5oScEiapxuOoyCf3Qgwj2ExWFwJuMQ3NaVzmq82c0MKvZSlz+Rz370LAYkMSC174KFqP/oea770mkCjoYcReTOOVppaekUmHqmyk/rG8OkL57nbfvf0OJW8i9zRlpRonCRyw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=p9uiYaMQ3fHs3uZf4bVOH57G10MAASEl/i4LnwrzyDQ=; b=WwiJkEyrSH2hF70GyZkNxRdHa2cn1jDfCfLCO78Fj3P8pD4mMcmvj86tImCldSkD1uur0V9w4tZ0Aze/AZN884KKg/3MUEdSiA10rz3gv9UtOFGxRg659LXE+xhJKCCZ9BSuaQm0ELOIYAJ9I9ZgUQ3qdVO1+e/7W9NcqM+eI1o= Received: from AM0PR08MB3986.eurprd08.prod.outlook.com (20.178.118.90) by AM0PR08MB4036.eurprd08.prod.outlook.com (20.178.119.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.15; Wed, 11 Dec 2019 06:45:22 +0000 Received: from AM0PR08MB3986.eurprd08.prod.outlook.com ([fe80::78e3:5650:fa68:4d68]) by AM0PR08MB3986.eurprd08.prod.outlook.com ([fe80::78e3:5650:fa68:4d68%7]) with mapi id 15.20.2538.012; Wed, 11 Dec 2019 06:45:22 +0000 From: "Ruifeng Wang (Arm Technology China)" To: Abdul Halim , "dev@dpdk.org" CC: "ray.kinsella@intel.com" , "yasufum.o@gmail.com" , nd Thread-Topic: [PATCH v5] build: add dockerfile for building docker image Thread-Index: AQHVr2F/52wqmPiIhEut9f2BnDcWkqe0fPgQ Date: Wed, 11 Dec 2019 06:45:22 +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: <1575986121-366042-1-git-send-email-abdul.halim@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: fe668e89-84bf-4873-ace7-d94c0aaed4ac.0 x-checkrecipientchecked: true Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Ruifeng.Wang@arm.com; x-originating-ip: [113.29.88.7] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: ea00286d-a3bc-4e69-a66c-08d77e05b76e X-MS-TrafficTypeDiagnostic: AM0PR08MB4036:|DB6PR0802MB2519: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:9508;OLM:9508; x-forefront-prvs: 024847EE92 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(396003)(346002)(376002)(136003)(366004)(39860400002)(199004)(189003)(13464003)(7696005)(26005)(66946007)(71200400001)(55236004)(53546011)(6506007)(76116006)(66556008)(64756008)(66476007)(66446008)(186003)(33656002)(8936002)(4326008)(52536014)(316002)(9686003)(2906002)(54906003)(478600001)(8676002)(110136005)(55016002)(5660300002)(81156014)(81166006)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR08MB4036; H:AM0PR08MB3986.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: bOwpavkh9VS5fhFSrYn9xgelaSI+tcbwlXqDskhrAEiay9wPthD5pFws4o2HVIXw9oSwtV+qx0CxVuD4uigB3pgcb77yDtwuwFPD0xTZ9WhZfAHVrcdjUaEVvj6REDxyYlUVZYZw1TXcWo6HCEP0HCxSZS5qJok+eHTOStfVAKXpbG7j+peBT3dp3s1KrLFxLSSKYYnXB+V4Qiq5J3H/KqwkEOvxTrLaN+3wqY7SvD39suW3tK1bOQOWTzGpIqBmfWbx1NuB916CyLyOaJmotX1ANEnipPFe+fT1gcYWDcSckqXL0tFlQGXsZL2KpShWk0TwUuK4lC3Kovyjv0+wPBtBammw6zu09Av1DVqGfyUcbMhtPeN07+OfEXWhZjmkA+gPHv8Bf5OPdctzvspaZ7yqMM3+1eFe74X7dyJ5Iqvox8EpEnI0ixsWwQ7iL0guAd3aAs+U6OffpK/HaDCVlDK+x0AcaVW+akmh9T+DKwt5HCdsQj6o9a0aDBfWp9QT x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4036 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Ruifeng.Wang@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT056.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; IPV:CAL; SCL:-1; CTRY:IE; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(346002)(376002)(136003)(396003)(13464003)(199004)(189003)(81166006)(8676002)(9686003)(70586007)(110136005)(53546011)(81156014)(336012)(86362001)(6506007)(76130400001)(33656002)(356004)(7696005)(2906002)(316002)(54906003)(26826003)(478600001)(26005)(52536014)(8936002)(5660300002)(55016002)(4326008)(70206006)(186003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0802MB2519; H:64aa7808-outbound-1.mta.getcheckrecipient.com; FPR:; SPF:Pass; LANG:en; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; A:1; MX:1; X-MS-Office365-Filtering-Correlation-Id-Prvs: 384e816d-15c8-4572-17e6-08d77e05b22c NoDisclaimer: True X-Forefront-PRVS: 024847EE92 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YtlTnKdrjkWLimB1DYjbZvL5QbV0y68WDdWTAGk675uVEN6ygWhN7vqU0FM0MzkZ/1c8r6Z0e2njdg204fZxnaW2zU9Qh3GiRUcg7z2wvSpYJE2vmM6I+mrDfXyttICQOzskCbIK2R4tWyjJ8qyrdeEgVj8vYDlDnA5ggP1fwE4pwqUfCTE9+qqv5hSWp2TIIvsH+q9fMKwj9g9b5ozvzRZkaSUwJQKBx9vxYwteN7CrEAfYA+Nhbtvm9cMVkHWGE3CZcRetjoTDybfFF0olQZgfmlRwPrIqRwqAoVR8TwHVFrAwvXm8Z7lY3odgpkZaVlPYv8QNdsPMNGDNy1ESyd+dOLg9HJwWcmjgJaWrIqKhyxl2r0vikuGajnMcMrDlI0LdM+IWo+AD3XQMqU73K2LEEcLO9bCXVoMYMMUfjftXbRVuyYvolLDF2wOxTaJcDp2kaYNzKH0fQ9wsH0Vx71esrEruYBbE+qQurEgG9otPZMLwXgzlgUN8gISwUJeU X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Dec 2019 06:45:31.3082 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ea00286d-a3bc-4e69-a66c-08d77e05b76e X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0802MB2519 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: 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 >=20 > 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 d= pdk > applications in containers. >=20 > Signed-off-by: Abdul Halim >=20 > --- >=20 > 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 >=20 > --- >=20 > v3: > * added example use-case of dpdk dockerfile in extras/README.md >=20 > --- > v4: > * changed meson build to use tmp dir in docker build > * changed sample app dockerfile to add only helloworld source code >=20 > --- > 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 >=20 > 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. 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 >=20 > -------------------------------------------------------------- > Intel Research and Development Ireland Limited Registered in Ireland > Registered Office: Collinstown Industrial Park, Leixlip, County Kildare > Registered Number: 308263 >=20 >=20 > This e-mail and any attachments may contain confidential material for the > sole use of the intended recipient(s). Any review or distribution by othe= rs is > strictly prohibited. If you are not the intended recipient, please contac= t the > sender and delete all copies.