Skip to content

how to use remote Docker host #6921

Closed

Description

@matifali

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

Activity

  1. bpmct commented on Apr 7, 2023

    @bpmct
    Member

    Perhaps we could add a variable for the Docker socket location in our Docker template, which by default is the UNIX location?

  2. matifali commented on Apr 7, 2023

    @matifali
    ContributorAuthor

    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.

  3. bpmct commented on Apr 10, 2023

    @bpmct
    Member

    @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

  4. self-assigned this
    on May 5, 2023
  5. removed their assignment
    on Jun 28, 2023
  6. added a commit that references this issue on Jul 12, 2023
    a438860
  7. changed the title [-]Remote docker template[/-] [+]how to use remote Docker host[/+] on Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsArea: coder.com/docs

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions