MCPcopy
hub / github.com/stephengpope/thepopebot / createVolume

Function createVolume

lib/tools/docker.js:853–859  ·  view source on GitHub ↗

* Create a named Docker volume. * @param {string} name - Volume name * @returns {Promise } Volume name

(name)

Source from the content-addressed store, hash-verified

851 * @returns {Promise<string>} Volume name
852 */
853async function createVolume(name) {
854 const { status, data } = await dockerApi('POST', '/volumes/create', { Name: name });
855 if (status !== 201 && status !== 200) {
856 throw new Error(`Docker volume create failed (${status}): ${data?.message || JSON.stringify(data)}`);
857 }
858 return name;
859}
860
861/**
862 * Remove a Docker volume by name.

Callers 1

runAgentJobContainerFunction · 0.85

Calls 1

dockerApiFunction · 0.85

Tested by

no test coverage detected