Skip to content
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

OCI container fixes #1001

Merged
merged 3 commits into from
Jul 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
incusd/instance: Fix initial configuration handling for OCI
The existing logic would reset the volatile keys, most importantly, it
would reset the idmap volatile keys causing containers to switch to
fully privileged in some cases.

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
  • Loading branch information
stgraber committed Jul 15, 2024
commit 091a87835262b512c42283dc9afa3f4c5b0413e3
3 changes: 3 additions & 0 deletions cmd/incusd/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ func instanceCreateFromImage(ctx context.Context, s *state.State, r *http.Reques

// If dealing with an OCI image, parse the configuration.
if args.Type == instancetype.Container && inst.LocalConfig()["image.type"] == "oci" {
// Reset the config to the post-generation one.
args.Config = inst.LocalConfig()

// Mount the instance.
_, err = pool.MountInstance(inst, nil)
if err != nil {
Expand Down