@getmonoceros/workbench 1.6.9 → 1.6.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin.js CHANGED
@@ -2697,6 +2697,34 @@ async function detectDockerMode(options = {}) {
2697
2697
  return "rootful";
2698
2698
  }
2699
2699
  }
2700
+ function formatRootlessNotSupportedError() {
2701
+ return [
2702
+ `Monoceros requires Docker in "rootful" mode.`,
2703
+ ``,
2704
+ `You're running Docker in "rootless" mode right now. That setup`,
2705
+ `runs the daemon without root privileges \u2014 sounds safer, but it`,
2706
+ `doesn't play well with the way Monoceros shares files between`,
2707
+ `your host and the container. Specifically: files created inside`,
2708
+ `the container (cloned repos, new commits, build output) end up`,
2709
+ `with ownership that your normal host user can't edit without`,
2710
+ `sudo. That breaks the "edit on host, run in container" loop the`,
2711
+ `entire workflow is built around.`,
2712
+ ``,
2713
+ `To fix, switch back to standard rootful Docker:`,
2714
+ ``,
2715
+ cyan2(` systemctl --user disable --now docker.service docker.socket`),
2716
+ cyan2(` dockerd-rootless-setuptool.sh uninstall`),
2717
+ cyan2(` rm -rf ~/.local/share/docker`),
2718
+ cyan2(` unset DOCKER_HOST`),
2719
+ cyan2(` sudo systemctl enable --now docker`),
2720
+ cyan2(` sudo usermod -aG docker $USER`),
2721
+ ``,
2722
+ `Verify with ${cyan2("docker info | grep -i rootless")} \u2014 it should`,
2723
+ `produce no output. Then re-run.`,
2724
+ ``,
2725
+ `Background: see ${cyan2("docs/docker-on-linux.md")} in the workbench repo.`
2726
+ ].join("\n");
2727
+ }
2700
2728
 
2701
2729
  // src/devcontainer/identity.ts
2702
2730
  import { spawn as spawn6 } from "child_process";
@@ -2897,6 +2925,9 @@ ${sectionLine(label)}
2897
2925
  const dockerMode = await detectDockerMode({
2898
2926
  ...opts.dockerInfoSpawn ? { spawn: opts.dockerInfoSpawn } : {}
2899
2927
  });
2928
+ if (dockerMode === "rootless") {
2929
+ throw new Error(formatRootlessNotSupportedError());
2930
+ }
2900
2931
  await fs8.mkdir(targetDir, { recursive: true });
2901
2932
  await writeScaffold(createOpts, targetDir, { dockerMode });
2902
2933
  await writeStateFile(
@@ -2974,7 +3005,7 @@ function warnOnDeprecatedFeatureRefs(containerFeatures, globalConfig, logger) {
2974
3005
  }
2975
3006
 
2976
3007
  // src/version.ts
2977
- var CLI_VERSION = true ? "1.6.9" : "dev";
3008
+ var CLI_VERSION = true ? "1.6.10" : "dev";
2978
3009
 
2979
3010
  // src/commands/_dispatch.ts
2980
3011
  import { consola as consola11 } from "consola";