You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remote docker host should be specified as ssh://user@host
Key to access the host should be already available on the deployment in ~/.ssh/KEY
For services like fly.io, railway.app, render.com, where putting the key inside the Dockerfile is not a good solution. The private key can be created as a secret or secured environment variable.
We can also create a managed sensitive terraform variable to store the key, which is not secure as values are stored unencrypted in the database. Thanks, @deansheather
Check for the value of the Secret/Environment variable and create ~/.ssh/KEY file with the correct permissions on the Coder host to be able to access the remote docker host using terraform local-exec
Activity
bpmct commentedon Apr 7, 2023
Perhaps we could add a variable for the Docker socket location in our Docker template, which by default is the UNIX location?
matifali commentedon Apr 7, 2023
Yes but should we assume that the user already has the ssh key on their coder host?
Or they can only connect using the unsecured tcp.
bpmct commentedon Apr 10, 2023
@matifali for now, let's add a doc under "platforms" with a little guide on how to support remote hosts, like I did for Kubernetes
https://coder.com/docs/v2/latest/platforms/docker
docs: add docs to use remote Docker host
[-]Remote docker template[/-][+]how to use remote Docker host[/+]