MCPcopy Create free account
hub / github.com/coder/envbox / generateBindMounts

Function generateBindMounts

dockerutil/container.go:196–207  ·  view source on GitHub ↗
(mounts []xunix.Mount)

Source from the content-addressed store, hash-verified

194}
195
196func generateBindMounts(mounts []xunix.Mount) []string {
197 binds := make([]string, 0, len(mounts))
198 for _, mount := range mounts {
199 bind := fmt.Sprintf("%s:%s", mount.Source, mount.Mountpoint)
200 if mount.ReadOnly {
201 bind += ":ro"
202 }
203 binds = append(binds, bind)
204 }
205
206 return binds
207}

Callers 1

CreateContainerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected