Merge pull request #1159 from Faeranne/main

Feature: support for Docker TLS based connections
pull/1161/head
shamoon 2 years ago committed by GitHub
commit 903ab2c8d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -27,10 +27,22 @@ export default function getDockerArguments(server) {
} }
if (servers[server].host) { if (servers[server].host) {
return { const res ={
conn: { host: servers[server].host, port: servers[server].port || null }, conn: { host: servers[server].host },
swarm: !!servers[server].swarm, swarm: !!servers[server].swarm,
}; }
if (servers[server].port){
res.conn.port = servers[server].port;
}
if (servers[server].tls){
res.conn.ca = readFileSync(path.join(process.cwd(), "config", servers[server].tls.caFile));
res.conn.cert = readFileSync(path.join(process.cwd(), "config", servers[server].tls.certFile));
res.conn.key = readFileSync(path.join(process.cwd(), "config", servers[server].tls.keyFile));
}
return res;
} }
return servers[server]; return servers[server];

Loading…
Cancel
Save