|
@@ -18,6 +18,7 @@ import (
|
|
|
"github.com/docker/docker/pkg/truncindex"
|
|
|
"github.com/docker/docker/runconfig"
|
|
|
"github.com/docker/go-connections/nat"
|
|
|
+ "github.com/opencontainers/selinux/go-selinux/label"
|
|
|
)
|
|
|
|
|
|
// GetContainer looks for a container using the provided information, which could be
|
|
@@ -90,6 +91,9 @@ func (daemon *Daemon) load(id string) (*container.Container, error) {
|
|
|
if err := container.FromDisk(); err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
+ if err := label.ReserveLabel(container.ProcessLabel); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
|
|
|
if container.ID != id {
|
|
|
return container, fmt.Errorf("Container %s is stored at %s", container.ID, id)
|
|
@@ -307,7 +311,7 @@ func (daemon *Daemon) verifyContainerSettings(hostConfig *containertypes.HostCon
|
|
|
return nil, fmt.Errorf("maximum retry count cannot be negative")
|
|
|
}
|
|
|
case "":
|
|
|
- // do nothing
|
|
|
+ // do nothing
|
|
|
default:
|
|
|
return nil, fmt.Errorf("invalid restart policy '%s'", p.Name)
|
|
|
}
|