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
Project not starting with custom username for web service #4313
Comments
DDEV goes to great lengths to provide a web container with the username you use on your workstation. Can you say why you're trying to do this? I think it will likely be more involved than you think. |
I've got the username for my infrastructure hard coded at a lot of places in my application. I'm sure that is the main issue here, but a rewrite is not my priority right now. That is why I initially looked for a way to change the username in DDEV and was really happy with the solution of a custom yaml file. Like I said, the previous version worked fine with the environment.yaml I didn't know the DDEV team was working hard at mapping the username to the web container. But still, shouldn't the auto generated file in |
Can you say why it's important to change the username in the container? |
I do see that the approach you're using used to work for solving complex usernames, https://stackoverflow.com/questions/64933879/umlaut-in-username-unicodedecodeerror-utf-8-codec-cant-decode-byte-0xe9-in |
There are a few parts of my application that use the username I think I'll have to try and add a user during the DDEV initialisation, maybe as a |
I was hoping to get you to explain why the username inside the container is important to you. I understand that "there are a few parts of your application" but hope you'll explain why the ddev-webserver user is important. You could certainly add additional users in a .ddev/web-build/Dockerfile.* as well. |
Sorry, didn't get that and wanted to avoid adding unnecessary details. The "few parts" are actually mostly permission based issues that are all based on the user Hope this clears up the confusion. Thanks for the hint, I'll check out the Dockerfile for adding the user I need. |
I guess you have scripts running inside the web container that assume a specific user rather than using $USER? Ok, please follow up with your fix here when you get it. I'll close this for now, as this isn't a normal use-case. Happy to continue the conversation or help out or whatever. |
I'm working on this class of problem in https://github.com/rfay/ddev/tree/20221026_uid_collision , will be a PR soon. The "official" but off-topic issue is |
Please test with the artifacts at Please test with the artifacts at #4346 (comment) |
You can now test with |
Yeah, this fixed the issues I had. Thanks! |
Is there an existing issue for this?
Run a Diagnostic and Paste Link Here
Diagnostic runs fine, it's definitely something related to the project.
Expected Behavior
Starting my project with a custom
docker-compose.environment.yaml
file should just start.Actual Behavior
ddev start
fails with the following error messages:Steps To Reproduce
I'm using the .ddev/docker-compose.environment.yaml file in my project to change the username for the web service.
This used to work just fine, until I upgraded to version 1.21.2 of ddev. It seems there is an issue with the generated file in
.ddev/.webimageBuild/Dockerfile
which looks like this:I believe the issue lies in the last 2 lines, which seems to use my host username instead of the
$username
.Anything else?
No response
The text was updated successfully, but these errors were encountered: