mirror of
https://github.com/rancher/os.git
synced 2025-08-27 18:59:17 +00:00
Don't create container when disabled
This commit is contained in:
parent
34ac3236d4
commit
f09df5610f
@ -30,17 +30,20 @@ func (c *containerBasedService) Up() error {
|
||||
container := c.container
|
||||
containerCfg := c.container.ContainerCfg
|
||||
|
||||
fakeCreate := false
|
||||
create := containerCfg.CreateOnly
|
||||
|
||||
if util.Contains(c.cfg.Disable, c.name) {
|
||||
create = true
|
||||
fakeCreate = true
|
||||
}
|
||||
|
||||
var event project.Event
|
||||
|
||||
c.project.Notify(project.CONTAINER_STARTING, c, map[string]string{})
|
||||
|
||||
if create {
|
||||
if fakeCreate {
|
||||
event = project.CONTAINER_CREATED
|
||||
} else if create {
|
||||
container.Create()
|
||||
event = project.CONTAINER_CREATED
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user