pullCapacitorBuilder = (req, res, version) => {
  const child = spawn(
    "docker",
    ["pull", `saltcorn/capacitor-builder:${version}`],
    {
      stdio: ["ignore", "pipe", "pipe"],
    }
  );
  return new Promise((resolve, reject) => {
    child.stdout.on("data", (data) => {
      res.write(data);
    });
    child.stderr?.on("data", (data) => {
      res.write(data);
    });
    child.on("exit", function (code, signal) {
      resolve(code);
    });
    child.on("error", (msg) => {
      const message = msg.message ? msg.message : msg.code;
      res.write(req.__("Error: ") + message + "\n");
      resolve(msg.code);
    });
  });
}
Do Restart
@name post/restart
@function
@memberof module:routes/admin~routes/adminRouter