Failed to bind ssh port for container #1
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Env: Ubuntu 24.04.1 LTS
On the latest master
web .env
config.json
template name: dec-4-image
base: fedora 40 + openssh server + docker
build arguments:
user=test
password=test
new workspace name: dec-4-workspace

image: dec-4-image
docker runtime: nvidia (also selected runc; same effect)
go log
The toast message gives a workspace create error, but when i check docker desktop the workspace seems to be created
i tried to reproduce the issue with your config but can't. somehow port 22 isn't exposed for the workspace on your end. can you run:
and paste the output? mine looks like this:
as you can see port 22 is correctly exposed. also what OS are you running tesseract on?
OS is Ubuntu 24.04.1 LTS on WSL2 on Windows11

strange. can you run
it says the container is not running:
do you get the same error if you create another workspace? can you try
fedora 40 with openssh
for the base template?i am struggling to see why docker is not reporting the host port that is mapped to the container port even though it knows that port 22 is exposed on the container side.
https://github.com/kennethnym/tesseract/blob/master/internal/workspace/workspace_manager.go#L191-L199
the container looks like its running in Docker desktop


If i perform a create again, it asks me to rename the existing container to continue
If I try with a new workspace name, its back to the failed to bind ssh port toast error
do you have sshd daemon running on your host machine?
the app targets localhost in my case and I dont know if sshd is a required prerequisite
for me,

sudo lsof -i :2222
returns nothing and port 2222 on the host is not mapped to port 22 inside the containerno, on paper you don't need sshd on the host to have it working, but can you try starting sshd and see if it works?
the issue here is that docker inspect is not returning the exposed port on host for some reason. i am still failing to understand why that's the case.
can you also run
docker version
and paste the output here?it may be because Docker does not automatically bind a host port to a container port unless explicitly requested during container creation, and
inspect.NetworkSettings.Ports
is emptyNeed to ensure that
mgr.dockerClient.ContainerCreate
includes-p
or-P
sample: