C
Coder.com•4mo ago
AUGMENTED

Devcontainer with docker-compose

I'm pointing to my repo where my devcontainer points to a dockerComposeFIle:
"name": "Dev Environment",
"dockerComposeFile": "../docker-compose.yml",
"service": "dev-env",
"name": "Dev Environment",
"dockerComposeFile": "../docker-compose.yml",
"service": "dev-env",
My docker-compose.yml points to the Dockerfile:
services:
dev-env:
build:
context: .
dockerfile: Dockerfile
args:
USERNAME: coder
services:
dev-env:
build:
context: .
dockerfile: Dockerfile
args:
USERNAME: coder
But the workspace builder hangs here:
#1: 📦 Cloned repository! [298.379884ms]
No Dockerfile specified, looking for a devcontainer.json...
Building in Devcontainer mode using /.devcontainer/devcontainer.json
error: no Dockerfile or image found: no fallback image has been specified
#1: 📦 Cloned repository! [298.379884ms]
No Dockerfile specified, looking for a devcontainer.json...
Building in Devcontainer mode using /.devcontainer/devcontainer.json
error: no Dockerfile or image found: no fallback image has been specified
8 Replies
Codercord
Codercord•4mo ago
Codercord
Codercord•4mo ago
<#1377080813673382009>
Category
Help needed
Product
Coder (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
AUGMENTED
AUGMENTEDOP•4mo ago
#1: 📦 Cloned repository! [298.379884ms] No Dockerfile specified, looking for a devcontainer.json... Building in Devcontainer mode using /.devcontainer/devcontainer.json error: no Dockerfile or image found: no fallback image has been specified I would love to be able to get logs but I can't access anything beyond this. "Download Logs" is not available to click. I've even enabled "ENVBUILDER_LOG_LEVEL" = "debug" If I click stop it doesn't give me the ability to access logs. SSH fails
dev@WIN-JR3JPRKG7K3:~/workspaces/devenvs$ coder config-ssh
> The following changes will be made to your SSH configuration:

* Update the coder section in /home/dev/.ssh/config

Continue? (yes/no) yes

Updated "/home/dev/.ssh/config"
You should now be able to ssh into your workspace.
For example, try running:

$ ssh dev-env.coder
dev@WIN-JR3JPRKG7K3:~/workspaces/devenvs$ ssh coder.dev-env.main
Encountered an error running "coder ssh", see "coder ssh --help" for more information
error: "user" must be an existing uuid or username.
queried user="dev-env"
dev@WIN-JR3JPRKG7K3:~/workspaces/devenvs$ ssh dev-env.coder
==> â§— The workspace agent lost connection
2025-05-28 01:38:04.374+01:00 Wait for it to reconnect or restart your workspace.
2025-05-28 01:38:04.374+01:00 For more information and troubleshooting, see https://coder.com/docs/@v2.22.1/admin/templates/troubleshooting#agent-connection-issues and https://coder.com/docs/admin/templates/troubleshooting
dev@WIN-JR3JPRKG7K3:~/workspaces/devenvs$ coder config-ssh
> The following changes will be made to your SSH configuration:

* Update the coder section in /home/dev/.ssh/config

Continue? (yes/no) yes

Updated "/home/dev/.ssh/config"
You should now be able to ssh into your workspace.
For example, try running:

$ ssh dev-env.coder
dev@WIN-JR3JPRKG7K3:~/workspaces/devenvs$ ssh coder.dev-env.main
Encountered an error running "coder ssh", see "coder ssh --help" for more information
error: "user" must be an existing uuid or username.
queried user="dev-env"
dev@WIN-JR3JPRKG7K3:~/workspaces/devenvs$ ssh dev-env.coder
==> â§— The workspace agent lost connection
2025-05-28 01:38:04.374+01:00 Wait for it to reconnect or restart your workspace.
2025-05-28 01:38:04.374+01:00 For more information and troubleshooting, see https://coder.com/docs/@v2.22.1/admin/templates/troubleshooting#agent-connection-issues and https://coder.com/docs/admin/templates/troubleshooting
AUGMENTED
AUGMENTEDOP•4mo ago
Got ssh connected but it just shows the same logs as in the ui:
AUGMENTED
AUGMENTEDOP•4mo ago
Oh well I just found the issues on GitHub about not supporting the compose. So I'm guessing this can be closed.
matifali
matifali•4mo ago
Its still a work in progress and requires your workspace image to be able to run docker images.
AUGMENTED
AUGMENTEDOP•4mo ago
Thank you! I'll look into it!!!

Did you find this page helpful?