summaryrefslogtreecommitdiff
path: root/libpod/container.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2017-12-05 17:50:29 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2017-12-14 23:59:21 +0000
commit16237fe067362f73d0ce5699cef9b3b62a45dd3e (patch)
tree72cbcec4c11e310897b733d653f22cae75ccc0f6 /libpod/container.go
parent2bc20dd4d212ebbf14ee0de8fae7ce115fe00926 (diff)
downloadpodman-16237fe067362f73d0ce5699cef9b3b62a45dd3e.tar.gz
podman-16237fe067362f73d0ce5699cef9b3b62a45dd3e.tar.bz2
podman-16237fe067362f73d0ce5699cef9b3b62a45dd3e.zip
Add networking configuration to the libpod DB
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #109 Approved by: mheon
Diffstat (limited to 'libpod/container.go')
-rw-r--r--libpod/container.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/libpod/container.go b/libpod/container.go
index 43ed56848..12fd13f51 100644
--- a/libpod/container.go
+++ b/libpod/container.go
@@ -14,6 +14,7 @@ import (
"github.com/containerd/cgroups"
"github.com/containers/storage"
"github.com/containers/storage/pkg/archive"
+ "github.com/cri-o/ocicni/pkg/ocicni"
"github.com/docker/docker/daemon/caps"
"github.com/docker/docker/pkg/mount"
"github.com/docker/docker/pkg/namesgenerator"
@@ -119,6 +120,13 @@ type ContainerConfig struct {
MountLabel string `json:"MountLabel,omitempty"`
// Src path to be mounted on /dev/shm in container
ShmDir string `json:"ShmDir,omitempty"`
+ // CreateNetNS indicates that libpod should create and configure a new
+ // network namespace for the container
+ CreateNetNS bool `json:"createNetNS"`
+ // PortMappings are the ports forwarded to the container's network
+ // namespace
+ // These are not used unless CreateNetNS is true
+ PortMappings []ocicni.PortMapping
// Static directory for container content that will persist across
// reboot
StaticDir string `json:"staticDir"`
@@ -130,7 +138,7 @@ type ContainerConfig struct {
// about a container
Labels map[string]string `json:"labels,omitempty"`
// Mounts list contains all additional mounts by the container runtime.
- Mounts []string
+ Mounts []string `json:"mounts,omitempty"`
// StopSignal is the signal that will be used to stop the container
StopSignal uint `json:"stopSignal,omitempty"`
// Shared namespaces with container