Workspace build failed (remote Docker host over SSH)

Hi,
I modified the starter docker template (https://github.com/coder/coder/tree/main/examples/templates/docker) to support remote Docker host over SSH:

provider "docker" {
  host     = "ssh://coder@192.168.123.16"
}


SSH connection works properly (template was added correctly by Coder dashboard).

Unfortunately, when creating my first workspace based on this template, I encountered the following error:

Error: failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/snap/docker/common/var-lib-docker/tmp/buildkit-mount595635079/Dockerfile: no such file or directory

on main.tf line 159, in resource "docker_image" "main":
  159: resource "docker_image" "main" {


The remote Docker host is set up using Snap.

Can you suggest where the source of the problem may be?
GitHub
Provision remote development environments via Terraform - coder/coder
Was this page helpful?