Skip to content

how to use remote Docker host #6921

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
matifali opened this issue Mar 31, 2023 · 3 comments · Fixed by #8479
Closed

how to use remote Docker host #6921

matifali opened this issue Mar 31, 2023 · 3 comments · Fixed by #8479
Labels
docs Area: coder.com/docs

Comments

@matifali
Copy link
Member

Create a new remote docker template similar to docker-image-builds

  1. Remote docker host should be specified as ssh://user@host
  2. Key to access the host should be already available on the deployment in ~/.ssh/KEY
  3. 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.
  4. 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
  5. 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
@bpmct
Copy link
Member

bpmct commented 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
Copy link
Member Author

matifali commented 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
Copy link
Member

bpmct commented 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

@matifali matifali added the docs Area: coder.com/docs label May 5, 2023
@matifali matifali self-assigned this May 5, 2023
@matifali matifali removed their assignment Jun 28, 2023
matifali added a commit that referenced this issue Jul 12, 2023
@matifali matifali changed the title Remote docker template how to use remote Docker host Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Area: coder.com/docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants