summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libpod/container_inspect.go1
-rw-r--r--libpod/runtime.go5
-rw-r--r--pkg/inspect/inspect.go1
3 files changed, 7 insertions, 0 deletions
diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go
index a1070cf99..dec0b47b4 100644
--- a/libpod/container_inspect.go
+++ b/libpod/container_inspect.go
@@ -69,6 +69,7 @@ func (c *Container) getContainerInspectData(size bool, driverData *inspect.Data)
ImageID: config.RootfsImageID,
ImageName: config.RootfsImageName,
ExitCommand: config.ExitCommand,
+ Namespace: config.Namespace,
Rootfs: config.Rootfs,
ResolvConfPath: resolvPath,
HostnamePath: hostnamePath,
diff --git a/libpod/runtime.go b/libpod/runtime.go
index a0b673d81..1a384fde2 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -505,6 +505,11 @@ func makeRuntime(runtime *Runtime) (err error) {
return errors.Wrapf(ErrInvalidArg, "unrecognized state type passed")
}
+ if err := runtime.state.SetNamespace(runtime.config.Namespace); err != nil {
+ return errors.Wrapf(err, "error setting libpod namespace in state")
+ }
+ logrus.Debugf("Set libpod namespace to %q", runtime.config.Namespace)
+
// We now need to see if the system has restarted
// We check for the presence of a file in our tmp directory to verify this
// This check must be locked to prevent races
diff --git a/pkg/inspect/inspect.go b/pkg/inspect/inspect.go
index 5b5a27c3d..d2c9e79a5 100644
--- a/pkg/inspect/inspect.go
+++ b/pkg/inspect/inspect.go
@@ -169,6 +169,7 @@ type ContainerInspectData struct {
Dependencies []string `json:"Dependencies"`
NetworkSettings *NetworkSettings `json:"NetworkSettings"` //TODO
ExitCommand []string `json:"ExitCommand"`
+ Namespace string `json:"Namespace"`
}
// ContainerInspectState represents the state of a container.