containers / virtcontainers

A Go package for building hardware virtualized container runtimes
Apache License 2.0
139 stars 43 forks source link

container: Add a LinuxNamespaces field to the container config #634

Closed sboeuf closed 6 years ago

sboeuf commented 6 years ago

Based on https://github.com/containers/virtcontainers/issues/613, I think virtcontainers should define a new field LinuxNamespaces into ContainerConfig structure so that we can provide the list of namespaces from the runtime wrapper. We don't want to retrieve those namespaces directly from the OCI config.json file because we want to be specification agnostic, and that's why we actually want to define a Linux generic list of namespaces. Something like:

type LinuxNamespace struct {
        Type string
        Path string
}

type ContainerConfig struct {
        ...
        LinuxNamespaces []LinuxNamespace
        ...
}

This list of namespaces and their paths could be used by virtcontainers to properly start/spawn components such as shim into the right/expected namespaces.

egernst commented 6 years ago

This issue was moved to kata-containers/runtime#149