Merge pull request #1290 from riyazdf/ro-system-containers

Add read-only option to containers, apply to all except nginx
This commit is contained in:
Riyaz Faizullabhoy 2017-03-13 16:23:44 +00:00 committed by GitHub
commit 450e39305b

View File

@ -41,6 +41,7 @@ type MobyImage struct {
NetworkMode string `yaml:"network_mode"` NetworkMode string `yaml:"network_mode"`
Pid string Pid string
Ipc string Ipc string
ReadOnly bool `yaml:"read_only"`
} }
const riddler = "mobylinux/riddler:7d4545d8b8ac2700971a83f12a3446a76db28c14@sha256:11b7310df6482fc38aa52b419c2ef1065d7b9207c633d47554e13aa99f6c0b72" const riddler = "mobylinux/riddler:7d4545d8b8ac2700971a83f12a3446a76db28c14@sha256:11b7310df6482fc38aa52b419c2ef1065d7b9207c633d47554e13aa99f6c0b72"
@ -88,6 +89,9 @@ func ConfigToRun(order int, path string, image *MobyImage) []string {
for _, bind := range image.Binds { for _, bind := range image.Binds {
args = append(args, "-v", bind) args = append(args, "-v", bind)
} }
if image.ReadOnly {
args = append(args, "--read-only")
}
// image // image
args = append(args, image.Image) args = append(args, image.Image)
// command // command