MCPcopy
hub / github.com/Dokploy/dokploy / getRemoteDocker

Function getRemoteDocker

packages/server/src/utils/servers/remote-docker.ts:5–21  ·  view source on GitHub ↗
(serverId?: string | null)

Source from the content-addressed store, hash-verified

3import Dockerode from "dockerode";
4
5export const getRemoteDocker = async (serverId?: string | null) => {
6 if (!serverId) return docker;
7 const server = await findServerById(serverId);
8 if (!server.sshKeyId) return docker;
9 const dockerode = new Dockerode({
10 host: server.ipAddress,
11 port: server.port,
12 username: server.username,
13 protocol: "ssh",
14 // @ts-ignore
15 sshOptions: {
16 privateKey: server.sshKey?.privateKey,
17 },
18 });
19
20 return dockerode;
21};

Callers 15

mechanizeDockerContainerFunction · 0.90
pullRemoteImageFunction · 0.90
getServiceContainerFunction · 0.90
getComposeContainerFunction · 0.90
buildMysqlFunction · 0.90
buildMongoFunction · 0.90
buildRedisFunction · 0.90
buildLibsqlFunction · 0.90
buildPostgresFunction · 0.90
buildMariadbFunction · 0.90
setupForwardAuthFunction · 0.90
removeForwardAuthFunction · 0.90

Calls 1

findServerByIdFunction · 0.90

Tested by

no test coverage detected