Skip to content
This repository has been archived by the owner before Nov 9, 2022. It is now read-only.

Add IpcMode #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -43,6 +43,7 @@ func createStep(spec *engine.Spec, src *yaml.Container) *engine.Step {
DNSSearch: src.DNSSearch,
ExtraHosts: src.ExtraHosts,
Image: image.Expand(src.Image),
IPC: src.IPC,
Networks: nil, // set in compiler.go
Ports: toPorts(src),
Privileged: src.Privileged,
@@ -153,6 +153,9 @@ func checkContainer(container *yaml.Container, trusted bool) error {
if trusted == false && len(container.ExtraHosts) > 0 {
return errors.New("linter: untrusted repositories cannot configure extra_hosts")
}
if trusted == false && len(container.IPC) > 0 {
return errors.New("linter: untrusted repositories cannot configure ipc")
}
for _, mount := range container.Volumes {
switch mount.Name {
case "workspace", "_workspace", "_docker_socket":
@@ -69,6 +69,7 @@ type (
ExtraHosts []string `json:"extra_hosts,omitempty" yaml:"extra_hosts"`
Failure string `json:"failure,omitempty"`
Image string `json:"image,omitempty"`
IPC string `json:"ipc,omitempty" yaml:"ipc"`
Name string `json:"name,omitempty"`
Ports []*Port `json:"ports,omitempty"`
Privileged bool `json:"privileged,omitempty"`
@@ -42,6 +42,7 @@ func printContainer(w writer, v *yaml.Container) {
w.WriteTagValue("dns", v.DNS)
w.WriteTagValue("dns_search", v.DNSSearch)
w.WriteTagValue("extra_hosts", v.ExtraHosts)
w.WriteTagValue("ipc", v.IPC)

if len(v.Settings) > 0 {
printSettings(w, v.Settings)