-
Notifications
You must be signed in to change notification settings - Fork 29
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
Container image v24.9.0: uid 1000 is missing from /etc/passwd #381
Comments
This report needs to polished a little bit because in its current form is misleading. AFAIK, by design docker mounts I am not sure if podman does the same, but the idea is that seeing such a message is to be expected. |
Let me know what I can add/change.
Could you expand on that? I compared the |
I have never seen docker mount /etc/passwd from the host, unless it is explicitly done via a volume mount. I have a feeling this issue is due to #364 where the |
I think you are right here..... navigator sets the user to root if the engine is podman: https://github.com/ansible/ansible-navigator/blob/4b9165c69fe726c52c525600700c6cd4608a6f84/src/ansible_navigator/runner/base.py#L95 but not so for docker. While the devcontainer file specifies root for both docker and podman it's not the case for navigator. It does look like a miss... |
There's actually a little more to this....... ansible-builder injects an entrypoint script that should be building user 1000 at invocation of the container that said, /etc/passwd isn't writeable, we might change that |
This issue happens only with docker and only on newer docker versions, like the one shipping with ubuntu-24.04 or with docker-desktop on macos. They changed something that no longer allows the dark magic entrypoint.py used by ansible-builder to dynamically add the missing user to the container. I am not sure what we need to do to address it,... it might make more sense to play a little bit with simple containers only only try to make /etc/passwd editable. |
Hello 👋🏼,
I maintain a Terraform provider for Ansible which executes
ansible-navigator run
commands using theansible-dev-tools
container image as the default EEI. Anyways, while running the project's acceptance tests locally using version 24.9.0 of the container image I bumped into what I suspect might be a regression involving this change: #364. See below for the bug report. Lastly, one more detail which confuses me: I opened a PR against said Terraform provider project to run the acceptance tests in CI with the container image change. To my surprise, the tests all pass (including those which fail on my local dev machine as described below). Perhaps it has to do with the user id or container engine that GitHub runners have setup?Thank you!
Host OS:
Linux
Host user (
id -u
):1000
Ansible navigator version:
24.9.0
Container engine version (Docker):
27.2.1
Container image:
ghcr.io/ansible/community-ansible-dev-tools:v24.9.0
Error:
Inventory:
Config:
Command:
The text was updated successfully, but these errors were encountered: