修正
This commit is contained in:
16
_check_compose.py
Normal file
16
_check_compose.py
Normal file
@@ -0,0 +1,16 @@
|
||||
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)
|
||||
|
||||
# NAS上の実際のdocker-compose.ymlを確認
|
||||
_, o, _ = c.exec_command('cat /volume1/docker/njts-accounting/docker-compose.yml')
|
||||
print("=== docker-compose.yml ===")
|
||||
print(o.read().decode())
|
||||
|
||||
# コンテナの全マウントを確認
|
||||
_, o2, _ = c.exec_command('docker inspect njts-accounting-backend --format "{{range .Mounts}}{{.Source}} -> {{.Destination}}{{println}}{{end}}"')
|
||||
print("=== マウント一覧 ===")
|
||||
print(o2.read().decode())
|
||||
|
||||
c.close()
|
||||
Reference in New Issue
Block a user