summaryrefslogtreecommitdiff
path: root/libpod/container_internal.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-05-16 12:38:17 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-05-21 19:26:56 +0000
commit82feafecdda8040432c008d9b79e4f973009adfc (patch)
tree8edffbe531bcf47c40b34cd003e4063142fbc84f /libpod/container_internal.go
parent687b165a737742e1f1930cd9782002d857e07aaf (diff)
downloadpodman-82feafecdda8040432c008d9b79e4f973009adfc.tar.gz
podman-82feafecdda8040432c008d9b79e4f973009adfc.tar.bz2
podman-82feafecdda8040432c008d9b79e4f973009adfc.zip
podman create, start, getattachsocket
First pass at implement API endpoints for create and start. Signed-off-by: baude <bbaude@redhat.com> Closes: #805 Approved by: baude
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r--libpod/container_internal.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 39a665bb1..e34a79eb1 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -106,14 +106,20 @@ func (c *Container) rwSize() (int64, error) {
return c.runtime.store.DiffSize(layer.Parent, layer.ID)
}
-// The path to the container's root filesystem - where the OCI spec will be
+// bundlePath returns the path to the container's root filesystem - where the OCI spec will be
// placed, amongst other things
func (c *Container) bundlePath() string {
return c.config.StaticDir
}
-// Retrieves the path of the container's attach socket
-func (c *Container) attachSocketPath() string {
+// ControlSocketPath returns the path to the containers control socket for things like tty
+// resizing
+func (c *Container) ControlSocketPath() string {
+ return filepath.Join(c.bundlePath(), "ctl")
+}
+
+// AttachSocketPath retrieves the path of the container's attach socket
+func (c *Container) AttachSocketPath() string {
return filepath.Join(c.runtime.ociRuntime.socketsDir, c.ID(), "attach")
}