DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Halim, Abdul" <abdul.halim@intel.com>
To: Ray Kinsella <mdr@ashroe.eu>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] build: add dockerfile for building docker image
Date: Mon, 30 Sep 2019 12:21:47 +0000	[thread overview]
Message-ID: <724F0E06E67D5E4D86952256DC667179455D65BD@IRSMSX102.ger.corp.intel.com> (raw)
In-Reply-To: <c83a162e-af5d-9386-e155-6e8b7d3453b5@ashroe.eu>

Hi Ray,
Thanks for your feedback.
Please see comments inline.

> -----Original Message-----
> From: Ray Kinsella [mailto:mdr@ashroe.eu]
> Sent: Monday, September 30, 2019 9:54 AM
> To: Halim, Abdul <abdul.halim@intel.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] build: add dockerfile for building docker
> image
> 
> Hi Abdul,
> 
> Comments inline.
> 
> On 27/08/2019 17:44, Abdul Halim wrote:
> > 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 <abdul.halim@intel.com>
> > ---
> >  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
> 
> So I would be concerned about it being called Dockerfile.ubuntu, because at
> the moment it only covers Bionic, and Xenial is still supported until April 21.
> The pattern FD.io VPP adopts is calling it Dockerfile.bionic.

I will rename this file to Dockerfile.bionic as suggested.

> 
> > 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
> > +
> 
> Is it safe to remove /tmp/dpdk, then remove the WORKDIR.
> Should be the other way around?
>

The WORKDIR instruction sets the working directory for any RUN, CMD, ENTRYPOINT, COPY and ADD instructions that follow it. It is very much like 'cd' into a location for other commands to run in there. Once the dpdk build is finished successfully and library is installed we no longer need the source files in the final image. So, we can safely remove it and the subsequent ' WORKDIR /' instruction below ensures that WORKDIR is set to a valid location.
 
> > +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 .
> > +```
> >
--------------------------------------------------------------
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.

  reply	other threads:[~2019-09-30 12:21 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-27 16:44 Abdul Halim
2019-09-30  8:54 ` Ray Kinsella
2019-09-30 12:21   ` Halim, Abdul [this message]
2019-10-04 10:08 ` [dpdk-dev] [PATCH v2] " Abdul Halim
2019-10-15  8:39   ` Ray Kinsella
2019-11-13 20:26     ` Yasufumi Ogawa
2019-12-03 11:42 ` [dpdk-dev] [PATCH v3] " Abdul Halim
2019-12-05 14:13   ` Ruifeng Wang (Arm Technology China)
2019-12-05 19:51     ` Yasufumi Ogawa
2019-12-06 11:12       ` Halim, Abdul
2019-12-09  3:23         ` Ruifeng Wang (Arm Technology China)
2019-12-09  9:44           ` Yasufumi Ogawa
2019-12-09 10:18         ` Yasufumi Ogawa
2019-12-10 13:16           ` Halim, Abdul
2019-12-10 13:44 ` [dpdk-dev] [PATCH v4] " Abdul Halim
2019-12-10 13:55 ` [dpdk-dev] [PATCH v5] " Abdul Halim
2019-12-10 17:44   ` Ray Kinsella
2019-12-11 10:53     ` Halim, Abdul
2019-12-11 17:00       ` Ray Kinsella
2023-06-12  2:44         ` Stephen Hemminger
2019-12-11  6:45   ` Ruifeng Wang (Arm Technology China)
2019-12-11 16:35     ` Halim, Abdul
2019-12-11 16:39 ` [dpdk-dev] [PATCH v6] " Abdul Halim
2019-12-12  6:53   ` Ruifeng Wang (Arm Technology China)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=724F0E06E67D5E4D86952256DC667179455D65BD@IRSMSX102.ger.corp.intel.com \
    --to=abdul.halim@intel.com \
    --cc=dev@dpdk.org \
    --cc=mdr@ashroe.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).