Docker

安装状态:{status.installed ? '已安装' : '未安装'} {status.version || ''}

{#if error}

{error}

{/if}

运行容器

部署 Compose

Docker Compose 项目

{#each composeProjects as project}
{project.name} {project.status === 'Running' ? '运行中' : '已停止'} 服务:{(project.services || []).join(', ') || '-'} 容器:{(project.containers || []).length}
{/each} {#if composeProjects.length === 0}

未发现 Docker Compose 项目。

{/if}

容器

{#each containers as c}
{c.names}{c.image}{containerStatus(c.status)}{c.ports || '-'}
{/each}
{#if execContainer}

容器终端

{execContainer.names || execContainer.id}

通过 docker exec -it 进入容器,只连接当前容器,不开放任意宿主机命令。

{/if} {#if selectedContainer}

容器详情

{selectedContainer}

资源占用来自 docker stats --no-stream,配置来自 docker inspect。

{statValue('CPUPerc')}CPU
{statValue('MemUsage')}内存
{statValue('NetIO')}网络
{statValue('BlockIO')}磁盘 IO
{#each detailPairs(containerDetail) as pair}
{pair[0]}{pair[1]}
{/each}

挂载目录

{#if mountList(containerDetail).length === 0}

无挂载目录。

{:else}
{#each mountList(containerDetail) as mount} {mount} {/each}
{/if}
{/if} {#if proxyVisible}

一键创建 Nginx 反代

目标:{proxyTarget}。会创建站点、启用站点,并执行 nginx -t 后重载。

{/if} {#if logs}

容器日志

{logs}
{/if}

镜像

{#each images as img}
{img.repository}:{img.tag}{img.id}{img.size}
{/each}

数据卷

删除数据卷会删除持久化数据。只建议删除确认不再被容器使用的卷。

{#each volumes as volume}
{volume.Name || volume.name} 驱动:{volume.Driver || '-'} 挂载点:{volume.Mountpoint || '-'}
{/each} {#if volumes.length === 0}

未发现 Docker 数据卷。

{/if}