Using a template without an explicit `user` breaks the workspace container
When starting the example
docker-code-server
as-is, I get this chdir - no such file or directory
error:
I made an issue for it on Github https://github.com/coder/coder/issues/3870
There we found out the HOME
environment somehow gets set to the username of user 1000 of the host server:
(It's set to /home/skerit
when it should be /home/coder
)
The workaround for this was to add this to the workspace
resource:
This is on an Arch server, btw 😄7 Replies
Thanks for starting the thread. Could you check if there are any settings in
/etc/docker/daemon.json
on the Arch machine?Just my custom dns settings:
Ok, that def. wouldn't mess with anything.
I wanted to test if I could reproduce this on Arch, but no go. Worked perfectly when I installed docker and postgresql (
pacman -S docker postgresql
), initialized the db, started coder server (as root), uploaded the docker-code-server
template and created a workspace. The workspace startup had no errors and had HOME=/home/coder
.
I had also prepared the arch host machine with a user named maf
and UID 1000 beforehand.
Does your setup diverge from what I described in any way?Docker version info (in Arch Linux) for reference
Could you share the output of
docker info
btw? I honestly have no idea where to start with this so just throwing darts in the dark.Sure:
My coder's postgres server is also a docker container btw, but can't imagine that would be the cause of all of this 🙂
Also on my server, coder is running as
coder
, not root.Thanks. Both of those differences should be OK, can't imagine them affecting the issue at hand.