forked from mirror/MCSM-Daemon
commit
aa4e95225b
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user