-
Notifications
You must be signed in to change notification settings - Fork 3k
apiv2 container create using specgen #5204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
apiv2 container create using specgen #5204
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: baude The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
0bd0265 to
e3d3c62
Compare
pkg/specgen/create.go
Outdated
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.
You know, I think useImageVolumes might be 100% unused...
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.
what do you want me to do; it is in the current code path.
pkg/specgen/create.go
Outdated
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.
Shouldn't this also be only if len(s.Entrypoint) > 0?
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.
Hmmm. We might want to pull from the image in that case.
|
I'll look into useImageVolumes on the Libpod side, and make a PR to tear it
out of it really is unused, we can merge that before or after this, doesn't
really matter
…On Fri, Feb 14, 2020, 09:17 Brent Baude ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In pkg/specgen/create.go
<#5204 (comment)>:
> + return nil, err
+ }
+
+ podmanPath, err := os.Executable()
+ if err != nil {
+ return nil, err
+ }
+ options = append(options, s.createExitCommandOption(rtc, podmanPath))
+ newImage, err := rt.ImageRuntime().NewFromLocal(s.Image)
+ if err != nil {
+ return nil, err
+ }
+
+ // TODO mheon wants to talk with Dan about this
+ useImageVolumes := s.ImageVolumeMode == "bind"
+ options = append(options, libpod.WithRootFSFromImage(newImage.ID(), s.Image, useImageVolumes))
what do you want me to do; it is in the current code path.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#5204>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3AOCD2NF3KXBYUQU3M7SDRC2RXNANCNFSM4KU2VM3A>
.
|
e3d3c62 to
8e40a72
Compare
|
☔ The latest upstream changes (presumably #5203) made this pull request unmergeable. Please resolve the merge conflicts. |
8e40a72 to
d859474
Compare
d859474 to
850c830
Compare
|
☔ The latest upstream changes (presumably #5158) made this pull request unmergeable. Please resolve the merge conflicts. |
850c830 to
1d751c3
Compare
|
☔ The latest upstream changes (presumably #5225) made this pull request unmergeable. Please resolve the merge conflicts. |
1d751c3 to
293d063
Compare
this uses the specgen structure to create containers rather than the outdated createconfig. right now, only the apiv2 create is wired up. eventually the cli will also have to be done. Signed-off-by: Brent Baude <[email protected]>
293d063 to
d65ff6b
Compare
|
/lgtm |
PR containers#5204 added /libpod/containers/create but with the wrong swagger comment. Fix that. Also fix some other inconsistencies: missing 'libpod' prefix, missing 'Container' suffix, and change 'ContainerCreate' to 'CreateContainer'; all of these changes preserve consistency with both the invoked function as well as the overall naming conventions used in this module. Signed-off-by: Ed Santiago <[email protected]>
PR containers#5204 added /libpod/containers/create but with the wrong swagger comment. Fix that. Also fix some other inconsistencies: missing 'libpod' prefix, missing 'Container' suffix, and change 'ContainerCreate' to 'CreateContainer'; all of these changes preserve consistency with both the invoked function as well as the overall naming conventions used in this module. Signed-off-by: Ed Santiago <[email protected]>
this uses the specgen structure to create containers rather than the outdated createconfig. right now, only the apiv2 create is wired up. eventually the cli will also have to be done.
Signed-off-by: Brent Baude [email protected]