Skip to content
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

mysql: ENV HOME=/ inappropriately overrides $HOME #75578

Open
rfay opened this issue Dec 9, 2024 · 2 comments
Open

mysql: ENV HOME=/ inappropriately overrides $HOME #75578

rfay opened this issue Dec 9, 2024 · 2 comments
Assignees
Labels
in-progress mysql tech-issues The user has a technical issue about an application

Comments

@rfay
Copy link

rfay commented Dec 9, 2024

Name and Version

bitnami/mysql

What architecture are you using?

arm64

What steps will reproduce the bug?

docker run -it --rm --entrypoint=bash -u 34:34 bitnami/mysql:8.0
id
uid=34(backup) gid=34(backup) groups=34(backup)
grep backup /etc/passwd
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin

echo $HOME
/

What is the expected behavior?

HOME should be the home directory of the user

What do you see instead?

HOME is always set to /, as a result of the ENV HOME=/ in https://github.com/bitnami/containers/blob/main/bitnami/mysql/8.0/debian-12/Dockerfile#L21-L24

Additional information

DDEV's ddev-dbserver adds an extra layer to bitnami/mysql:8.0 with a user matching the host user. But it doesn't work right because $HOME is broken.

In added layer ENV HOME="" resolves this problem, but I don't think the ENV HOME=/ is appropriate in any case.

@rfay rfay added the tech-issues The user has a technical issue about an application label Dec 9, 2024
@github-actions github-actions bot added the triage Triage is needed label Dec 9, 2024
@github-actions github-actions bot removed the triage Triage is needed label Dec 11, 2024
@github-actions github-actions bot assigned dgomezleon and unassigned carrodher Dec 11, 2024
@dgomezleon
Copy link
Member

Hi @rfay

Note you always can adapt env variables for your deployment (e.g. using docker-compose.yaml).

If you want to contribute a solution with a different proposal, we welcome you to create a pull request. The Bitnami team is excited to review your submission and offer feedback. You can find the contributing guidelines here.

Your contribution will greatly benefit the community. Feel free to reach out if you have any questions or need assistance.

@rfay
Copy link
Author

rfay commented Dec 11, 2024

I'm happy to do a PR removing HOME. I'm pretty sure it doesn't ever make sense to pre-emptively set it like this. I guess I'd assume somebody once had a reason for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-progress mysql tech-issues The user has a technical issue about an application
Projects
None yet
Development

No branches or pull requests

3 participants