1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

move configs structs to remove dependency on daemon

- Moved the following config structs to api/types
   - ContainerRmConfig
   - ContainerCommitConfig

Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
This commit is contained in:
Morgan Bauer 2015-12-04 12:34:43 -08:00
parent a56f258c8a
commit 63fb931a0b
No known key found for this signature in database
GPG key ID: 23F15C502128F348
11 changed files with 49 additions and 34 deletions

View file

@ -8,6 +8,7 @@ import (
"time"
"github.com/docker/distribution/reference"
"github.com/docker/docker/api/types"
"github.com/docker/docker/container"
"github.com/docker/docker/dockerversion"
"github.com/docker/docker/image"
@ -17,22 +18,9 @@ import (
"github.com/docker/docker/runconfig"
)
// ContainerCommitConfig contains build configs for commit operation,
// and is used when making a commit with the current state of the container.
type ContainerCommitConfig struct {
Pause bool
Repo string
Tag string
Author string
Comment string
// merge container config into commit config before commit
MergeConfigs bool
Config *runconfig.Config
}
// Commit creates a new filesystem image from the current state of a container.
// The image can optionally be tagged into a repository.
func (daemon *Daemon) Commit(name string, c *ContainerCommitConfig) (string, error) {
func (daemon *Daemon) Commit(name string, c *types.ContainerCommitConfig) (string, error) {
container, err := daemon.Get(name)
if err != nil {
return "", err