https://pulumi.com logo
Title
b

billions-lawyer-5518

01/26/2022, 11:03 AM
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 ?
const remoteInstance = new docker.Provider(
  "remote",
  {
    host: interpolate`<ssh://user>@${externalIP}:22`,
  },
  { dependsOn: dockerInstallation }
);
g

great-queen-39697

01/27/2022, 3:13 PM
Sorry for the delay! Are you defining any environment variables or any Pulumi configuration variables? What's the error you're getting?
b

billions-lawyer-5518

01/27/2022, 3:29 PM
Hi @great-queen-39697, Thanks for getting back.
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

billions-lawyer-5518

01/27/2022, 3:38 PM
Yes, I want to run containers.
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,
  }
);