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 98577A04F2; Thu, 5 Dec 2019 15:13:58 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 26F381BF7F; Thu, 5 Dec 2019 15:13:57 +0100 (CET) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50059.outbound.protection.outlook.com [40.107.5.59]) by dpdk.org (Postfix) with ESMTP id 1226D1BF7D for ; Thu, 5 Dec 2019 15:13:55 +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=KAJ+ulXUZLMgVYQg2w5Xija5WLDWMmQjrHd6GfNCtpY=; b=qz4ObhRZwywim+NzXnJE1d2ma++8MTawsmuU3TISJlujl2y5VJQufVC6r8kZp7x4ujLzVZSLeUmvkWO17OzTmyNxqGfwwO/My/kTJBA4gH9kdyNlTPgNQr/I8CZeJYx47wK16YL1dRLprKUlq0hziEt8zjEB/9gIYPEJ4q2S88E= Received: from VI1PR0801CA0079.eurprd08.prod.outlook.com (2603:10a6:800:7d::23) by VI1PR08MB3119.eurprd08.prod.outlook.com (2603:10a6:803:3f::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2516.14; Thu, 5 Dec 2019 14:13:53 +0000 Received: from AM5EUR03FT048.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::201) by VI1PR0801CA0079.outlook.office365.com (2603:10a6:800:7d::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2516.13 via Frontend Transport; Thu, 5 Dec 2019 14:13:53 +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 AM5EUR03FT048.mail.protection.outlook.com (10.152.17.177) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.18 via Frontend Transport; Thu, 5 Dec 2019 14:13:53 +0000 Received: ("Tessian outbound 45a30426f8e4:v37"); Thu, 05 Dec 2019 14:13:53 +0000 X-CR-MTA-TID: 64aa7808 Received: from 92796fa44161.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 7ECEE2F9-3D2D-498F-8672-8D8E218D2A29.1; Thu, 05 Dec 2019 14:13:48 +0000 Received: from EUR02-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 92796fa44161.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 05 Dec 2019 14:13:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VWuc90jUlfps/ldzmTsynHJOifj/LrJ0IW7GExjC/WSqWakMUxtDkCRyI3XsKjRv4V8/rdBAg93ipz1sRJGERdBpMVV5flWroZIRMch79HpzVfwe41887lhSOtaaQpBz/8RZ93ClNGXg7UFXYodmeeqxcWWlZU1Pq16fY+Yo4igirieLzcEB3xwCN3kAl3zLeBS6deaX0WkSz9s73Zcsg8Mp2J3IAmlNDgQCUSOJf4fGwSF+OCfNSKZV88lXZB3rwLPxCJb55NE3CbFY8GRIfalgiZRaeifTeQNykpuOrBdAuTqHFjZAqrXjLbjbW3f5+kvl3qAvBiszYI3e4muzNQ== 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=KAJ+ulXUZLMgVYQg2w5Xija5WLDWMmQjrHd6GfNCtpY=; b=dWTba7jvdaa+5nqCdZRteENcRqWJteYctf1KPgBgLXdgcuutGwR1iMMp2a6RCBYeC2/hTJF92vrOhke956g1nJ8bdmt9Ow7Lgq8OT80XAKwCXiVNhmsAnsXlnCtRLtxo6RW2pycEAvUAPDkk67ya6CIAMYpglY44iDGpU1Cwn3fb8aXYMKFHumnHvoooz516/l5OOElKh4OmWQTjLmiZRNUTyMImfqWuC9t7cklxBojvX8XsNkZqPFvHJZf3LJhCERKvOl+qwpuGTBm9+RH5fJyZ2TywewdgR8zJB7BxnorKoTSmqKFy5OPuwIQcMi5eURWckZunAVoch8PPQMqMpw== 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=KAJ+ulXUZLMgVYQg2w5Xija5WLDWMmQjrHd6GfNCtpY=; b=qz4ObhRZwywim+NzXnJE1d2ma++8MTawsmuU3TISJlujl2y5VJQufVC6r8kZp7x4ujLzVZSLeUmvkWO17OzTmyNxqGfwwO/My/kTJBA4gH9kdyNlTPgNQr/I8CZeJYx47wK16YL1dRLprKUlq0hziEt8zjEB/9gIYPEJ4q2S88E= Received: from AM0PR08MB3986.eurprd08.prod.outlook.com (20.178.118.90) by AM0PR08MB3505.eurprd08.prod.outlook.com (20.177.108.224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.22; Thu, 5 Dec 2019 14:13:46 +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.2516.013; Thu, 5 Dec 2019 14:13:46 +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: [dpdk-dev] [PATCH v3] build: add dockerfile for building docker image Thread-Index: AQHVqc7WLFOI4yWlr0+F7303CkWt36erlpug Date: Thu, 5 Dec 2019 14:13:46 +0000 Message-ID: References: <1566924290-451677-1-git-send-email-abdul.halim@intel.com> <1575373341-29969-1-git-send-email-abdul.halim@intel.com> In-Reply-To: <1575373341-29969-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: 71a828e5-8894-4e50-a948-781ac3da5542.0 x-checkrecipientchecked: true Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Ruifeng.Wang@arm.com; x-originating-ip: [222.68.170.73] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 925d61fa-b487-4706-f0a9-08d7798d5c03 X-MS-TrafficTypeDiagnostic: AM0PR08MB3505:|VI1PR08MB3119: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:10000;OLM:10000; x-forefront-prvs: 02426D11FE X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(346002)(376002)(396003)(39860400002)(136003)(366004)(13464003)(189003)(199004)(14444005)(102836004)(305945005)(8936002)(81156014)(76116006)(66446008)(81166006)(86362001)(66476007)(64756008)(66556008)(229853002)(76176011)(66946007)(74316002)(5660300002)(9686003)(4326008)(186003)(26005)(7696005)(99286004)(54906003)(33656002)(110136005)(53546011)(25786009)(55016002)(478600001)(11346002)(71190400001)(52536014)(316002)(2906002)(71200400001)(6506007)(14454004); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR08MB3505; H:AM0PR08MB3986.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A: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: fvavuB5bNaCpHY3Jurm6zo+s0fZHD6Vva66RPs7TU3S633MAVI8nj7XH5qoy9GvJKTLMPk/489hGATv+K+F+rENAbEIawdrhxSTSYezFPgXgKkoBqrr4YLzl28cjcv+B2pXK9aVSdmkTguup3hEbEBuiAagAfR9QMCa7TNhQaC+QyTvbKJ3fS9PBe3ikcV84Dh1EONjumzEg53aaKg+TF8G6jodIpgLy3q864AZF9NgfW7/LHMQFCGKuNywe8DkpfTNZdSt/qW00a+oRRVMa3ocxuznPTgY6g4vkP+RpERMXJpDaoo76++k+JF6amn2Q7z/Suyox+0CoxvKP10gOCi/WC7SE5FYJVOoFXsXTn0AJm8n2AsBESITRg2IyfKe8urkKDEYWZFxylmm3OEizlthLmi1FDC0VJ+eJZ1mvn6RWGNgnC8yshk3HBO7623j4u5eHivROY60Dr5z/gP8DyCEq1ova4E7ikzS/nGkTygCdU3z6caZUjsW1eTC8KWuU 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: AM0PR08MB3505 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Ruifeng.Wang@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT048.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)(396003)(346002)(376002)(136003)(39860400002)(13464003)(189003)(199004)(76130400001)(4326008)(305945005)(74316002)(336012)(70206006)(11346002)(5660300002)(26826003)(36906005)(8936002)(81156014)(25786009)(53546011)(81166006)(14454004)(46406003)(76176011)(14444005)(52536014)(2906002)(316002)(478600001)(356004)(54906003)(23726003)(7696005)(110136005)(70586007)(9686003)(26005)(33656002)(229853002)(6506007)(86362001)(186003)(55016002)(22756006)(99286004)(102836004)(50466002)(97756001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB3119; H:64aa7808-outbound-1.mta.getcheckrecipient.com; FPR:; SPF:Pass; LANG:en; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; MX:1; A:1; X-MS-Office365-Filtering-Correlation-Id-Prvs: c2cac6cb-c521-4aea-ddaf-08d7798d57c2 NoDisclaimer: True X-Forefront-PRVS: 02426D11FE X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 786H/je6EPFgY9Cp7Z2ck7d7+B5h2SYoKzDSu4nsB71zkyGaWXjzhhqEVWXaS8ZbztozmOkKK3nneXvCe6wgDhij0oLJ2Vvz70AaZxYWAp2UBJUBTyqWwSnnse4oNdkktLGdSDvW/VpoEgM6gIN0brUhv/Z+6H0VLfz8fl2EKBVFLpL04cPzErnYimjXDGb2Aoyl6E6EStojPYtiE6DvSmo0uGtmBMO7oSceIPyJ+D8oKLmEhmGnPKT3rZrhP9FnBfVFvCY+vyzPa6s/ieHe38x338LJhd8HW9gABNoitQbCwPna382OVa+q9P4wMVNhkir72VypEVPkMdSp0iO58oID6z1PSZaZF/cbREvWTtAsYF3d+zIVa5N+E6er94FeIw4nkrLZTZThjRxwzJcfy4pALGfOP6/yZmOXzGphq3iJyc3XjEjTcHfrWo2iHk5lGwB0qjCzn1BMIzaj4swlqxebamJ7R3O+AnRLLunoIvgdSlj7BzH4OBwde5/INh46 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2019 14:13:53.6785 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 925d61fa-b487-4706-f0a9-08d7798d5c03 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: VI1PR08MB3119 Subject: Re: [dpdk-dev] [PATCH v3] 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: dev On Behalf Of Abdul Halim > Sent: Tuesday, December 3, 2019 19:42 > To: dev@dpdk.org > Cc: ray.kinsella@intel.com; yasufum.o@gmail.com; Abdul Halim > > Subject: [dpdk-dev] [PATCH v3] 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 > --- > extras/Dockerfile.bionic | 40 > +++++++++++++++++++++++++++++++++++++ > extras/README.md | 52 > ++++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 92 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..f83b720 > --- /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 build \ > + -Ddefault_library=3Dshared \ > + -Dmachine=3Ddefault \ > + -Dper_library_versions=3Dfalse \ > + && ninja -C build install \ > + && ldconfig \ > + && 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..f38d7f1 > --- /dev/null > +++ b/extras/README.md > @@ -0,0 +1,52 @@ > +# 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 dpdk helloworld application. Since, > +we are creating a docker file for dpdk helloworld app we need to add > +the dpdk source files, thus create the following docker file in dpdk roo= t > directory. > + > +``` > +cat << EOF > Dockerfile.dpdkSampleApp > +FROM dpdk > + > +ADD . /opt/dpdk > + > +WORKDIR /opt/dpdk/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 . > +``` Hi Abdul, I tried the steps on AArch64 platform, and hit error as below: $ sudo docker build -t ${DOCKERAPP_TAG} -f Dockerfile.dpdkSampleApp . Sending build context to Docker daemon 2.55GB Step 1/4 : FROM dpdk ---> 955448007987 Step 2/4 : ADD . /opt/dpdk ---> d8b58019a7e2 Step 3/4 : WORKDIR /opt/dpdk/examples/helloworld ---> Running in 14fc89f7d3cd Removing intermediate container 14fc89f7d3cd ---> 065a682c58fd Step 4/4 : RUN make && cp build/helloworld-shared /usr/local/bin/helloworld ---> Running in 11e755a7180b Makefile:44: *** "Please define RTE_SDK environment variable". Stop. The command '/bin/sh -c make && cp build/helloworld-shared /usr/local/bin/h= elloworld' returned a non-zero code: 2 Missing define of RTE_SDK and RTE_TARGET? > + > +This sample app now can be run like any other applicaiton in a docker > container. > + > +``` > +$ docker run --rm -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.