feat: 优化重启

This commit is contained in:
DDSRem
2023-09-08 19:49:10 +08:00
parent 091df01b7c
commit ae3b73a73f
4 changed files with 59 additions and 2 deletions

View File

@ -309,7 +309,7 @@ class SystemUtils:
"""
try:
# 创建 Docker 客户端
client = docker.from_env()
client = docker.DockerClient(base_url='tcp://127.0.0.1:2375')
# 获取当前容器的 ID
container_id = open("/proc/self/cgroup", "r").read().split("/")[-1]
if not container_id: