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
Add a WithPrivileged OCI constructor and the options needed to build it #2269
Conversation
oci/spec_opts.go
Outdated
@@ -27,6 +27,17 @@ import ( | |||
// SpecOpts sets spec specific information to a newly generated OCI spec | |||
type SpecOpts func(context.Context, Client, *containers.Container, *specs.Spec) error | |||
|
|||
func Compose(opts ...SpecOpts) SpecOpts { |
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.
Make sure to add a godoc here.
5ffd283
to
b80f7f8
Compare
LGTM |
b80f7f8
to
7a4f33c
Compare
Codecov Report
@@ Coverage Diff @@
## master #2269 +/- ##
==========================================
- Coverage 41.1% 41.06% -0.04%
==========================================
Files 66 66
Lines 7768 7775 +7
==========================================
Hits 3193 3193
- Misses 4070 4077 +7
Partials 505 505
Continue to review full report at Codecov.
|
@justincormack This is neat! :) Thanks a lot |
Can we have ctr flag for this? |
7a4f33c
to
a71776f
Compare
@AkihiroSuda added. |
21080b8
to
96a8c66
Compare
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
96a8c66
to
9031910
Compare
Test added. The appveyor failure looks unrelated... I need to add some additional pieces around devices in privileged mode, and potentially there may be more pieces but I can do in follow up PRs. |
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.
LGTM
Restarted appveyor, but it is indeed unrelated.
Yes, there seems to be an issue with platform manifest pulling:
/cc @darrenstahlmsft @stevvooe |
The problem is with the test, I am fixing. The test is trying to do a multiplatform pull then checking how many manifests exists. One of the architectures it is trying to pull doesn't exist. It appears to pass on Linux because amd64 is already there so it is counting it, while on Windows it is not. There also appears to have been a change in the busybox image to remove 386, causing this failure to suddenly start. |
This is for my conversion of cri to use the containerd OCI functions.
I also added a Compose function because we all love functional programming...
Signed-off-by: Justin Cormack justin.cormack@docker.com