GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add `network_driver_opt` to client.containers run and create by Skazza94 · Pull Request #3083 · docker/docker-py

Conversation

@Skazza94

@Skazza94 Skazza94 commented Dec 27, 2022

Copy link
Copy Markdown
Contributor

This pull request adds an additional parameter to client.containers.run and client.containers.create called network_driver_opt.

This parameter allows to specify a dict which allows to pass to the driver some custom values, and it is the same already present in Network.connect.

I requested this feature in #2896, but it was never implemented.

I think it could be useful to also export other parameters of networking_config.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tcaiazzi reacted with rocket emoji
All reactions
  • 🚀 1 reaction
@Skazza94
Skazza94 requested review from aiordache and ulyssessouza as code owners December 27, 2022 23:56
@milas milas self-assigned this Jan 26, 2023
@milas milas added kind/enhancement level/dockerclient labels Jan 26, 2023
milas
milas reviewed Jan 26, 2023
View reviewed changes

@milas milas left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! This looks good to me, I just need you to sign-off on the commits before I can accept it. There's instructions at https://github.com/docker/docker-py/pull/3083/checks?check_run_id=10326470472 if you're unfamiliar with the process.

Also, I agree re: exposing more of networking_config. It doesn't feel great to piecemeal expose parts of it, but this is consistent with the other methods (e.g. Network::connect()) as you pointed out, so let's go with it! 🙃

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Skazza94 added 2 commits January 27, 2023 14:43
@Skazza94
Add network_driver_opt to client.containers run and create (#2896)
c5dc2c8
Signed-off-by: Mariano Scazzariello <[email protected]>
@Skazza94
Fix docs
c647831
Signed-off-by: Mariano Scazzariello <[email protected]>
@Skazza94

Skazza94 commented Jan 27, 2023

Copy link
Copy Markdown
Contributor Author

Hi @milas,
thanks for reviewing the PR 😄. I signed the commits.

Also, I agree re: exposing more of networking_config. It doesn't feel great to piecemeal expose parts of it, but this is consistent with the other methods (e.g. Network::connect()) as you pointed out, so let's go with it! 🙃

I agree that it is consistent with the Network.connect method. As soon as I have time, I will also export the remaining network parameters to client.containers run and create.

milas reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

milas
milas approved these changes Jan 27, 2023
View reviewed changes
@milas
milas merged commit ee9151f into docker:master Jan 27, 2023
@Skazza94 Skazza94 mentioned this pull request May 7, 2023
Support all Network.connect parameters in client.containers.run and client.containers.create #3121
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@aiordache aiordache Awaiting requested review from aiordache
@ulyssessouza ulyssessouza Awaiting requested review from ulyssessouza
1 more reviewer
@milas milas milas approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@milas milas

Labels

kind/enhancement level/dockerclient

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@Skazza94 @milas
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.