Skip to content

Commit

Permalink
add support privilege to container
Browse files Browse the repository at this point in the history
Signed-off-by: Xian Chaobo <[email protected]>
  • Loading branch information
jimmyxian committed Jul 12, 2016
1 parent f98068e commit e5fa1d9
Show file tree
Hide file tree
Showing 5 changed files with 139 additions and 87 deletions.
7 changes: 4 additions & 3 deletions agent/exec/container/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,10 @@ func (c *containerConfig) config() *enginecontainer.Config {

func (c *containerConfig) hostConfig() *enginecontainer.HostConfig {
hc := &enginecontainer.HostConfig{
Resources: c.resources(),
Binds: c.binds(),
Tmpfs: c.tmpfs(),
Resources: c.resources(),
Binds: c.binds(),
Privileged: c.spec().Privileged,
Tmpfs: c.tmpfs(),
}

if c.task.LogDriver != nil {
Expand Down
207 changes: 123 additions & 84 deletions api/specs.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions api/specs.proto
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ message ContainerSpec {

// PullOptions parameterize the behavior of image pulls.
PullOptions pull_options = 10;

// Privileged give extended privileges to the container
bool privileged = 11;
}

// EndpointSpec defines the properties that can be configured to
Expand Down
Loading

0 comments on commit e5fa1d9

Please sign in to comment.