Merge pull request #31 from cdwcgt/windows-docker

删除 docker的win32检测
This commit is contained in:
Suwings 2022-07-15 14:08:24 +08:00 committed by GitHub
commit aa4e95225b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,7 +30,6 @@ import os from "os";
// 获取本系统镜像列表 // 获取本系统镜像列表
routerApp.on("environment/images", async (ctx, data) => { routerApp.on("environment/images", async (ctx, data) => {
if (os.platform() === "win32") return protocol.responseError(ctx, "[Unsupported] Windows 系统暂不支持此功能");
try { try {
const docker = new DockerManager().getDocker(); const docker = new DockerManager().getDocker();
const result = await docker.listImages(); const result = await docker.listImages();
@ -53,7 +52,6 @@ routerApp.on("environment/containers", async (ctx, data) => {
// 获取本系统网络列表 // 获取本系统网络列表
routerApp.on("environment/networkModes", async (ctx, data) => { routerApp.on("environment/networkModes", async (ctx, data) => {
if (os.platform() === "win32") return protocol.responseError(ctx, "[Unsupported] Windows 系统暂不支持此功能");
try { try {
const docker = new DockerManager().getDocker(); const docker = new DockerManager().getDocker();
const result = await docker.listNetworks(); const result = await docker.listNetworks();
@ -65,7 +63,6 @@ routerApp.on("environment/networkModes", async (ctx, data) => {
// 创建镜像 // 创建镜像
routerApp.on("environment/new_image", async (ctx, data) => { routerApp.on("environment/new_image", async (ctx, data) => {
if (os.platform() === "win32") return protocol.responseError(ctx, "[Unsupported] Windows 系统暂不支持此功能");
try { try {
const dockerFileText = data.dockerFile; const dockerFileText = data.dockerFile;
const name = data.name; const name = data.name;