diff --git a/factory.go b/factory.go index b74493359..f4c31160c 100644 --- a/factory.go +++ b/factory.go @@ -1,14 +1,20 @@ package libcontainer type Factory interface { - // Creates a new container in the given path. A unique ID is generated for the container and - // starts the initial process inside the container. + + // Creates a new container with the given id and starts the initial process inside it. + // id must be a string containing only letters, digits and underscores and must contain + // between 1 and 1024 characters, inclusive. + // + // The id must not already be in use by an existing container. Containers created using + // a factory with the same path (and file system) must have distinct ids. // // Returns the new container with a running process. // // Errors: - // Path already exists - // Config or initialConfig is invalid + // id is already in use by a container + // id has incorrect format + // config is invalid // System error // // On error, any partially created container parts are cleaned up (the operation is atomic).