-
Notifications
You must be signed in to change notification settings - Fork 881
/home/coder
volume is not being persisted on docker containers starting on version v2.18
#16188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, @caiodelgadonew @phorcys420 can you take a look? |
That makes a lot of sense, I was checking also the terraform providers for coder & docker and couldn't find anything related, |
hey @caiodelgadonew, thanks for the heads-up. The fact that the user is not being created is intended since we've switched to the generic See #15504 for the change that caused the issue, by switching from building a Dockerfile with a I will be rolling out a fix soon, but in the meantime you can replace L198's contents by resource "docker_container" "workspace" {
# [...]
volumes {
- container_path = "/home/${local.username}"
+ container_path = "/home/coder"
volume_name = docker_volume.home_volume.name
read_only = false
}
} |
/home/coder
volume is not being persisted on docker containers starting on version v2.18
@phorcys420 that fix on line 198 was what I did to fix it temporarily, not sure about the approach of the generic user, I personally like the idea of the username to match the container user |
I agree that it feels more personalized but building the image in-template caused an anti-pattern and made things slower overall. The issue with having a user created after the build time is that the tools are installed as the
Now you could say that the Another thing, how do you handle a user changing their username without running into the same problems? All these are reasons that make it unsuitable for an example template, because it will cause issues if the template admin is unaware of it. |
Gotcha @phorcys420 , all valid points. I think your solution makes more sense. Thanks! |
Thanks, @caiodelgadonew, for reporting this. This is going to be live in the upcoming release |
Starting a coder using the docker-compose provided in the documentation from a fresh install and using the default docker containers template, when starting the container coder does not creates the user within the container and fallback to coder user, leading to issues on defining the host volume that is owned by the current user and not coder, which means after a update of the template all data is gone,
This affects versions
v2.18.1
andv2.18.2
However the version
v2.17.3
seems working as expected.Screenshots for v2.18+
Screenshot for v2.17.3
The text was updated successfully, but these errors were encountered: