sandboxbox 2.2.1 → 2.2.2
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/CLAUDE.md +9 -1
- package/package.json +1 -1
- package/utils/podman.js +5 -5
package/CLAUDE.md
CHANGED
@@ -53,19 +53,27 @@ if (process.platform === 'win32') {
|
|
53
53
|
}
|
54
54
|
```
|
55
55
|
|
56
|
-
### Auto Podman Machine Start
|
56
|
+
### Auto Podman Machine Start (Rootless Mode)
|
57
57
|
```javascript
|
58
|
+
// Initialize with explicit rootless mode for portability
|
58
59
|
if (process.platform === 'win32' && isBundled) {
|
59
60
|
try {
|
60
61
|
execSync(`"${podmanPath}" info`, { stdio: 'pipe' });
|
61
62
|
} catch (infoError) {
|
62
63
|
if (infoError.message.includes('Cannot connect to Podman')) {
|
64
|
+
// Auto-initialize with rootless mode if machine doesn't exist
|
65
|
+
execSync(`"${podmanPath}" machine init --rootful=false`, { stdio: 'inherit' });
|
63
66
|
execSync(`"${podmanPath}" machine start`, { stdio: 'inherit' });
|
64
67
|
}
|
65
68
|
}
|
66
69
|
}
|
67
70
|
```
|
68
71
|
|
72
|
+
### Rootless vs Rootful Mode
|
73
|
+
- **Rootless (default)**: Runs without administrator privileges, portable across systems
|
74
|
+
- **Configuration**: All machines initialized with `--rootful=false` flag
|
75
|
+
- **Benefits**: No elevated permissions required, better security, true portability
|
76
|
+
|
69
77
|
## Isolation Architecture
|
70
78
|
|
71
79
|
### Workflow
|
package/package.json
CHANGED
package/utils/podman.js
CHANGED
@@ -55,7 +55,7 @@ export function checkPodman() {
|
|
55
55
|
console.log('\n✅ Podman machine started successfully in rootless mode!');
|
56
56
|
} catch (startError) {
|
57
57
|
if (startError.message.includes('not found') || startError.message.includes('does not exist')) {
|
58
|
-
execSync(`"${podmanPath}" machine init`, {
|
58
|
+
execSync(`"${podmanPath}" machine init --rootful=false`, {
|
59
59
|
stdio: 'inherit',
|
60
60
|
cwd: __dirname,
|
61
61
|
shell: process.platform === 'win32'
|
@@ -65,7 +65,7 @@ export function checkPodman() {
|
|
65
65
|
cwd: __dirname,
|
66
66
|
shell: process.platform === 'win32'
|
67
67
|
});
|
68
|
-
console.log('\n✅ Podman machine initialized and started
|
68
|
+
console.log('\n✅ Podman machine initialized and started in rootless mode!');
|
69
69
|
} else {
|
70
70
|
throw startError;
|
71
71
|
}
|
@@ -102,11 +102,11 @@ export function checkPodman() {
|
|
102
102
|
execSync(`"${newPodmanPath}" info`, { ...execOptions, stdio: 'pipe' });
|
103
103
|
} catch (infoError) {
|
104
104
|
if (infoError.message.includes('Cannot connect to Podman')) {
|
105
|
-
console.log('\n🔧 Initializing Podman machine...');
|
105
|
+
console.log('\n🔧 Initializing Podman machine in rootless mode...');
|
106
106
|
try {
|
107
|
-
execSync(`"${newPodmanPath}" machine init`, { stdio: 'inherit', shell: true });
|
107
|
+
execSync(`"${newPodmanPath}" machine init --rootful=false`, { stdio: 'inherit', shell: true });
|
108
108
|
execSync(`"${newPodmanPath}" machine start`, { stdio: 'inherit', shell: true });
|
109
|
-
console.log('\n✅ Podman machine initialized and started!');
|
109
|
+
console.log('\n✅ Podman machine initialized and started in rootless mode!');
|
110
110
|
} catch (machineError) {
|
111
111
|
console.log('\n⚠️ Podman machine initialization will be done on first use');
|
112
112
|
}
|