Commit 6cc72e22 authored by jinkaiqiang's avatar jinkaiqiang

增加dockerignore缩减体积

parent e9085a2d
Pipeline #31267 passed with stage
in 13 seconds
**/.git
**/.dockerignore
**/Dockerfile*
\ No newline at end of file
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
import paramiko, getpass # getpass是隐藏密码 import paramiko, getpass # getpass是隐藏密码
from paramiko import AuthenticationException from paramiko import AuthenticationException
from app.application.application_service import ApplicationService
class SSHConnect(): class SSHConnect():
def __init__(self, host_ip, host_port, user_name, password): def __init__(self, host_ip, host_port, user_name, password):
...@@ -13,6 +15,9 @@ class SSHConnect(): ...@@ -13,6 +15,9 @@ class SSHConnect():
self.password = password self.password = password
def conncet(self): def conncet(self):
if not ApplicationService().test_connect_port(self.host_ip, self.host_port):
raise RuntimeError(f'{self.host_ip}连不上,请检查')
try: try:
# SSH远程连接 # SSH远程连接
self.ssh = paramiko.SSHClient() # 创建sshclient self.ssh = paramiko.SSHClient() # 创建sshclient
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment