https://pulumi.com logo
Title
a

ambitious-musician-70428

04/11/2023, 6:10 PM
Hi everyone 🙂 I'm new to Pulumi and I've been able to setup my VMs in OpenStack with ssh and docker configured ... but I'm stuck with an enigmatic error when trying to create a container in the created VMs:
import pulumi
import pulumi_docker as docker

remote_docker = docker.Provider("remote_docker",
                                host="<ssh://user@xxx.xxx.xxx.xxx:22>",
                                ssh_opts=["-i", "/home/local_user/.ssh/id_rsa"]
                                )


container = docker.Container("hello",
                                name="hello",
                                tty="true",
                                image="<http://my-registry.com/alpine:latest|my-registry.com/alpine:latest>",
                                command=["sleep", "100000000"],
                                opts=pulumi.ResourceOptions(provider=remote_docker),
                                )
I'm getting the following error:
Diagnostics:
  docker:index:Container (hello):
    error: 1 error occurred:
        * Error pinging Docker server: Error response from daemon: 400 Bad Request: malformed Host header
This works locally ... but not remotely ... I can access the VM using ssh and run the container manually Any help is appreciated 🙂
b

billowy-army-68599

04/11/2023, 6:13 PM
a

ambitious-musician-70428

04/11/2023, 6:21 PM
can you access this https://ctxt.io/2/AACQffNnEA It was too long to share it here
s

salmon-account-74572

04/11/2023, 6:23 PM
SSH access isn’t currently supported with the Docker 4.x provider: https://github.com/pulumi/pulumi-docker/issues/580 Please upvote that issue if you would find this functionality useful. Thanks!
a

ambitious-musician-70428

04/11/2023, 6:39 PM
Any alternative to achieve the same goal using pulumi?
s

salmon-account-74572

04/11/2023, 7:06 PM
I’m verifying with Engineering, but I believe that TLS-based access to a remote Docker daemon is supported. It’s a bit more work, but it will get you what you need until SSH-based access is added.