Skip to content

Commit

Permalink
Merge pull request #39 from mrunalp/mount_label
Browse files Browse the repository at this point in the history
Add support for mount label to generate
  • Loading branch information
Mrunal Patel committed Apr 23, 2016
2 parents 3ad6509 + 0884c71 commit b31bc93
Show file tree
Hide file tree
Showing 5 changed files with 198 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Godeps/Godeps.json

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

191 changes: 191 additions & 0 deletions Godeps/_workspace/src/github.com/opencontainers/runtime-spec/LICENSE

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

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

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

2 changes: 2 additions & 0 deletions generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ var generateFlags = []cli.Flag{
cli.StringFlag{Name: "ipc", Usage: "ipc namespace"},
cli.StringFlag{Name: "uts", Usage: "uts namespace"},
cli.StringFlag{Name: "selinux-label", Usage: "process selinux label"},
cli.StringFlag{Name: "mount-label", Usage: "selinux mount context label"},
cli.StringSliceFlag{Name: "tmpfs", Usage: "mount tmpfs"},
cli.StringSliceFlag{Name: "args", Usage: "command to run in the container"},
cli.StringSliceFlag{Name: "env", Usage: "add environment variable"},
Expand Down Expand Up @@ -129,6 +130,7 @@ func modify(spec *rspec.Spec, context *cli.Context) error {
spec.Process.User.UID = uint32(context.Int("uid"))
spec.Process.User.GID = uint32(context.Int("gid"))
spec.Process.SelinuxLabel = context.String("selinux-label")
spec.Linux.MountLabel = context.String("mount-label")
spec.Platform.OS = context.String("os")
spec.Platform.Arch = context.String("arch")
spec.Process.Cwd = context.String("cwd")
Expand Down

0 comments on commit b31bc93

Please sign in to comment.