1

I have created VM instance in GCP using pulumi and installed docker. And I am trying to connect remote instance of the docker but its getting failed to due to connection establishment (asking for a key verification in a pop up window).

const remoteInstance = new docker.Provider(
  "remote",
  {
    host: interpolate`ssh://user@${externalIP}:22`,
  },
  { dependsOn: dockerInstallation }
);

I can able to run docker containers locally. But want to run the same in VM. The code snippet is here

Madhan
  • 305
  • 1
  • 5
  • 10
  • It'd be helpful to share the entire code, including how you started the VM and bootstrapped Docker – jaxxstorm Jan 28 '22 at 05:11
  • @jaxxstorm here is the code [gist](https://gist.github.com/madhank93/f65bf5119424f91aea23d4abf7dee653) – Madhan Jan 28 '22 at 05:53

1 Answers1

0

with the recent version of "@pulumi/docker": "^3.2.0" you can now pass the ssh options. Reference

const remoteInstance = new docker.Provider(
  "remote",
  {
    host: interpolate`ssh://user@${externalIP}:22`,
    sshOpts: [
      "-o",
      "StrictHostKeyChecking=no",
      "-o",
      "UserKnownHostsFile=/dev/null",
    ],
  },
  { dependsOn: dockerInstallation }
);
Madhan
  • 305
  • 1
  • 5
  • 10