Hi folks, I am trying to connect to docker which i...
# general
b
Hi folks, I am trying to connect to docker which is running on GCP - VM using docker provider. But its getting failed to due to connection establishment. Is there anyway we can pass remote connection args to it or is there anyway I can establish the connection ?
Copy code
const remoteInstance = new docker.Provider(
  "remote",
  {
    host: interpolate`<ssh://user>@${externalIP}:22`,
  },
  { dependsOn: dockerInstallation }
);
g
Sorry for the delay! Are you defining any environment variables or any Pulumi configuration variables? What's the error you're getting?
b
Hi @great-queen-39697, Thanks for getting back.
Copy code
config:
  docker:host: npipe:////.//pipe//docker_engine
This is the config I have in the
Pulumi.dev.yaml
file. When I try to run the above code It was asking for a key verification in a pop up window. Or Is their any example available to connect to remote docker instance ?.
It's a connection string to the registry, but hopefully you can use that as a starting point to extrapolate from while I'm hunting for a better example
👍 1
Are you trying to connect as part of your program to run commands?
b
Yes, I want to run containers.
Copy code
const selenoidImage = new docker.RemoteImage(
  "selenoid-image",
  {
    name: "aerokube/selenoid:1.10.7",
  },
  {
    provider: remoteInstance,
  }
);

const selenoidContainer = new docker.Container(
  "selenoid-container",
  {
    image: selenoidImage.name,
    ports: [{ internal: 4444, external: 4444 }],
    name: "selenoid",
  },
  {
    provider: remoteInstance,
  }
);