DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Juraj Linkeš" <juraj.linkes@pantheon.tech>
To: Jeremy Spewock <jspewock@iol.unh.edu>
Cc: Honnappa.Nagarahalli@arm.com, thomas@monjalon.net,
	 wathsala.vithanage@arm.com, probb@iol.unh.edu,
	paul.szczepanek@arm.com,  yoan.picchi@foss.arm.com, dev@dpdk.org
Subject: Re: [PATCH v3] dts: add Dockerfile
Date: Mon, 15 Jan 2024 10:22:59 +0100	[thread overview]
Message-ID: <CAOb5WZbm7SkQ5wZmfDBYvKJEmQOQGmD8drERnSExyHSAHGnnyw@mail.gmail.com> (raw)
In-Reply-To: <CAAA20UQyK2zMX1wokQZNghbmO7gxg4YqLsgUF04jXvbb5PfrjA@mail.gmail.com>

On Fri, Jan 12, 2024 at 3:59 PM Jeremy Spewock <jspewock@iol.unh.edu> wrote:
>
>
>
> On Fri, Jan 12, 2024 at 5:23 AM Juraj Linkeš <juraj.linkes@pantheon.tech> wrote:
>>
>> > diff --git a/dts/.devcontainer/devcontainer.json b/dts/.devcontainer/devcontainer.json
>> > new file mode 100644
>> > index 0000000000..6313cd3ded
>> > --- /dev/null
>> > +++ b/dts/.devcontainer/devcontainer.json
>> > @@ -0,0 +1,33 @@
>> > +// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
>> > +// https://github.com/microsoft/vscode-dev-containers/tree/v0.241.1/containers/docker-existing-dockerfile
>> > +{
>> > +       "name": "Existing Dockerfile",
>> > +
>> > +       // Sets the run context to one level up instead of the .devcontainer folder.
>> > +       "context": "..",
>> > +
>> > +       // Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
>> > +       "dockerFile": "../Dockerfile",
>> > +
>> > +       // Use 'forwardPorts' to make a list of ports inside the container available locally.
>> > +       // "forwardPorts": [],
>> > +
>> > +       // Uncomment the next line to run commands after the container is created - for example installing curl.
>>
>> The next line is uncommented, we should update or remove the comment.
>
>
> Good catch, I'll change this.
>
>>
>>
>> > +       "postCreateCommand": "poetry install --no-root",
>> > +
>> > +       "extensions": [
>> > +               "ms-python.vscode-pylance",
>> > +       ]
>> > +
>> > +       // Uncomment when using a ptrace-based debugger like C++, Go, and Rust
>> > +       // "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
>> > +
>> > +       // Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.
>> > +       // "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],
>> > +
>> > +       // Uncomment to mount your SSH keys into the devcontainer used by vscode.
>> > +       // "mounts": ["source=${localEnv:HOME}/.ssh,destination=/root/.ssh,type=bind,readonly"]
>>
>> Should this SSH key correspond to the user below?
>
>
> On one hand I agree it would be better to unify the two options, but on the other we don't make a remote user in the docker image so the option below can't be used anyway. I would be more in favor of just removing the remoteUser option and leaving this the way it is as that would line up better with what you can actually do with the container image we provide.
>
> Leaving it as a stub for something that could be done isn't a bad either though, or I could also add the remote user to the container, but I don't really see the need for a non-root user for running DTS currently.
>

Thanks for the explanation. As there is no need for it and adding
things that could be done (in other tools) seems out of scope to me,
let's remove it.

>>
>>
>> > +
>> > +       // Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root.
>> > +       // "remoteUser": "vscode"
>> > +}
>>
>> <snip>
>>
>> > diff --git a/dts/README.md b/dts/README.md
>> > new file mode 100644
>> > index 0000000000..dc88ec585e
>> > --- /dev/null
>> > +++ b/dts/README.md
>> > @@ -0,0 +1,70 @@
>> <snip>
>> > +#### Start docker container with SSH keys
>> > +
>> > +```shell
>> > +docker build --target dev -t dpdk-dts .
>> > +docker run -v $(pwd)/..:/dpdk -v /home/dtsuser/.ssh:/root/.ssh:ro -it dpdk-dts bash
>>
>> We talked about possibly baking the key into the image, but this seems
>> safer and pretty easy to use.
>> I understand this is tailored to the lab and I'm thinking about other
>> possible use cases, but it seems there would only be convoluted ones
>> (possibly with some extra security considerations, which is generally
>> not needed for testing purposes) where this doesn't do what we want it
>> to. I'd say this is good enough.
>>
>>
>> > +$ poetry install
>> > +$ poetry shell
>> > +```
>> > +

  reply	other threads:[~2024-01-15  9:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-03 13:46 [PATCH v1] " Juraj Linkeš
2022-11-04  9:16 ` Juraj Linkeš
2023-02-09 16:49   ` Patrick Robb
2023-04-28 19:34     ` Jeremy Spewock
2023-10-17 13:52 ` Paul Szczepanek
2023-10-26 21:56   ` Jeremy Spewock
2023-10-27  9:19     ` Juraj Linkeš
2024-01-11 21:35 ` [PATCH v2] " jspewock
2024-01-11 22:26   ` [PATCH v3] " jspewock
2024-01-12 10:23     ` Juraj Linkeš
2024-01-12 14:59       ` Jeremy Spewock
2024-01-15  9:22         ` Juraj Linkeš [this message]
2024-01-16 19:18     ` [PATCH v4] " jspewock
2024-01-17  9:00       ` Juraj Linkeš
2024-02-21  3:40       ` Patrick Robb
2024-03-07 10:51         ` Thomas Monjalon
     [not found]       ` <CAJvnSUDDpGdxe8D-GmtbVixrrrB_GRfvS985Cw1RLx79aLcXnA@mail.gmail.com>
2024-02-29 16:14         ` Nicholas Pratte

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=CAOb5WZbm7SkQ5wZmfDBYvKJEmQOQGmD8drERnSExyHSAHGnnyw@mail.gmail.com \
    --to=juraj.linkes@pantheon.tech \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=dev@dpdk.org \
    --cc=jspewock@iol.unh.edu \
    --cc=paul.szczepanek@arm.com \
    --cc=probb@iol.unh.edu \
    --cc=thomas@monjalon.net \
    --cc=wathsala.vithanage@arm.com \
    --cc=yoan.picchi@foss.arm.com \
    /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).