MCPcopy Create free account
hub / github.com/SocketCluster/socketcluster / dockerRestart

Function dockerRestart

bin/actions/docker.js:24–42  ·  view source on GitHub ↗
(arg)

Source from the content-addressed store, hash-verified

22};
23
24const dockerRestart = async function (arg) {
25 let appName = arg;
26 if (!appName) {
27 let appPath = '.';
28 let pkg = parsePackageFile(appPath);
29 appName = pkg.name;
30 }
31 try {
32 execSync(`docker stop ${appName}`, { stdio: 'ignore' });
33 this.successLog(`App '${appName}' was stopped.`, null, true);
34 } catch (e) {}
35 try {
36 execSync(`docker start ${appName}`);
37 this.successLog(`App '${appName}' is running.`);
38 } catch (e) {
39 this.errorLog(`Failed to start app '${appName}'.`);
40 }
41 process.exit();
42};
43
44const dockerRun = async function (arg, options) {
45 let appPath = arg || '.';

Callers

nothing calls this directly

Calls 1

parsePackageFileFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…