MCPcopy Index your code
hub / github.com/devcontainers/cli / convertMountToVolume

Function convertMountToVolume

src/spec-node/dockerCompose.ts:738–748  ·  view source on GitHub ↗

* Convert mount command arguments to Docker Compose volume * @param mount * @returns mount command representation for Docker compose

(mount: Mount)

Source from the content-addressed store, hash-verified

736 * @returns mount command representation for Docker compose
737 */
738function convertMountToVolume(mount: Mount): string {
739 let volume: string = '';
740
741 if (mount.source) {
742 volume = `${mount.source}:`;
743 }
744
745 volume += mount.target;
746
747 return volume;
748}
749
750/**
751 * Convert mount command arguments to volume top-level element

Calls

no outgoing calls

Tested by

no test coverage detected