MCPcopy
hub / github.com/containerd/containerd / bindToOverlay

Function bindToOverlay

core/unpack/unpacker.go:767–784  ·  view source on GitHub ↗

TODO: this is a temporary workaround until #13053 lands.

(mounts []mount.Mount)

Source from the content-addressed store, hash-verified

765
766// TODO: this is a temporary workaround until #13053 lands.
767func bindToOverlay(mounts []mount.Mount) []mount.Mount {
768 if len(mounts) != 1 || mounts[0].Type != "bind" {
769 return mounts
770 }
771
772 m := mount.Mount{
773 Type: "overlay",
774 Source: "overlay",
775 }
776 for _, o := range mounts[0].Options {
777 if o != "rbind" {
778 m.Options = append(m.Options, o)
779 }
780 }
781 m.Options = append(m.Options, "upperdir="+mounts[0].Source)
782
783 return []mount.Mount{m}
784}

Callers 2

TestBindToOverlayFunction · 0.85
unpackMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestBindToOverlayFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…