@xcanwin/manyoyo 3.1.0 → 3.2.0
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/README.md +7 -3
- package/bin/manyoyo.js +1 -1
- package/docs/README_EN.md +7 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -173,14 +173,18 @@ manyoyo -n docker-dev -m dind -x /bin/bash
|
|
|
173
173
|
nohup dockerd &
|
|
174
174
|
|
|
175
175
|
# 现在可以在容器内使用 docker 命令
|
|
176
|
-
docker
|
|
176
|
+
docker ps -a
|
|
177
177
|
```
|
|
178
178
|
|
|
179
179
|
#### 挂载 Docker Socket 开发
|
|
180
180
|
|
|
181
181
|
```bash
|
|
182
|
-
# 挂载 Docker Socket
|
|
183
|
-
|
|
182
|
+
# 挂载 Docker Socket(危险的!!!容器可以访问和执行宿主机的一切)
|
|
183
|
+
# 创建挂载 /var/run/docker.sock 的容器
|
|
184
|
+
manyoyo -n socket-dev -m mdsock -x /bin/bash
|
|
185
|
+
|
|
186
|
+
# 现在可以在容器内使用 docker 命令
|
|
187
|
+
docker ps -a
|
|
184
188
|
```
|
|
185
189
|
|
|
186
190
|
### 命令行选项
|
package/bin/manyoyo.js
CHANGED
|
@@ -214,7 +214,7 @@ function setContMode(mode) {
|
|
|
214
214
|
case 'mount-docker-socket':
|
|
215
215
|
case 'mdsock':
|
|
216
216
|
case 's':
|
|
217
|
-
CONT_MODE = "--volume /var/run/docker.sock:/var/run/docker.sock";
|
|
217
|
+
CONT_MODE = "--privileged --volume /var/run/docker.sock:/var/run/docker.sock";
|
|
218
218
|
console.log(`${RED}⚠️ 开启危险的容器嵌套容器模式, 危害: 容器可访问宿主机文件${NC}`);
|
|
219
219
|
break;
|
|
220
220
|
default:
|
package/docs/README_EN.md
CHANGED
|
@@ -173,14 +173,18 @@ manyoyo -n docker-dev -m dind -x /bin/bash
|
|
|
173
173
|
nohup dockerd &
|
|
174
174
|
|
|
175
175
|
# Now you can use docker commands inside the container
|
|
176
|
-
docker
|
|
176
|
+
docker ps -a
|
|
177
177
|
```
|
|
178
178
|
|
|
179
179
|
#### Mount Docker socket Development
|
|
180
180
|
|
|
181
181
|
```bash
|
|
182
|
-
# Mount Docker socket (dangerous
|
|
183
|
-
|
|
182
|
+
# Mount Docker socket (dangerous!!! containers can access and execute everything on the host)
|
|
183
|
+
# Create a container mounting /var/run/docker.sock
|
|
184
|
+
manyoyo -n socket-dev -m mdsock -x /bin/bash
|
|
185
|
+
|
|
186
|
+
# Now you can use docker commands inside the container
|
|
187
|
+
docker ps -a
|
|
184
188
|
```
|
|
185
189
|
|
|
186
190
|
### Command-Line Options
|