修正
This commit is contained in:
15
_check_mount.py
Normal file
15
_check_mount.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import paramiko
|
||||
c = paramiko.SSHClient()
|
||||
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
c.connect('192.168.0.61', username='root', password='59911784', timeout=15)
|
||||
# コンテナ内の /app/frontend の内容確認
|
||||
_, o, _ = c.exec_command('docker exec njts-accounting-backend ls -la /app/frontend/ | head -20')
|
||||
print("=== コンテナ内 /app/frontend ===")
|
||||
print(o.read().decode())
|
||||
# コンテナのマウント情報
|
||||
_, o2, _ = c.exec_command('docker inspect njts-accounting-backend --format "{{json .Mounts}}"')
|
||||
import json
|
||||
mounts = json.loads(o2.read().decode())
|
||||
for m in mounts:
|
||||
print(f" {m.get('Source')} -> {m.get('Destination')}")
|
||||
c.close()
|
||||
Reference in New Issue
Block a user