MCPcopy Create free account
hub / github.com/docker/compose / Mounts

Method Mounts

cmd/formatter/container.go:259–268  ·  view source on GitHub ↗

Mounts returns a comma-separated string of mount names present on the container. If the trunc option is set, names can be truncated (ellipsized).

()

Source from the content-addressed store, hash-verified

257// Mounts returns a comma-separated string of mount names present on the container.
258// If the trunc option is set, names can be truncated (ellipsized).
259func (c *ContainerContext) Mounts() string {
260 var mounts []string
261 for _, name := range c.c.Mounts {
262 if c.trunc {
263 name = formatter.Ellipsis(name, 15)
264 }
265 mounts = append(mounts, name)
266 }
267 return strings.Join(mounts, ",")
268}
269
270// LocalVolumes returns the number of volumes using the "local" volume driver.
271func (c *ContainerContext) LocalVolumes() string {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected