I need to run awx web and awx task containers as non root user, as my org’s direction to ensure container best practices. However, i only see that both containers come up only as root user. I have git cloned 11.2.0 for both. Is it possible to run these two images as non root user? If yes, then can you guys please provide some pointers/suggestions? Or can it be considered as enhancement or something like that if not possible to run as non root?
ENVIRONMENT- AWX version: 11.2.0
- AWX install method: docker on linux
- Operating System: centos 8
- Web Browser: ie 11
STEPS TO REPRODUCE1. Git clone awx 11.2.0
- Run the playbook install.yml
- Check the docker images for 11.2.0 is created for both awx web and awx task
- Run the images from docker-compose (with user as root)
- Login to both containers (docker exec) and check ‘whoami’ command output.
EXPECTED RESULTS
As expected, it shows root
ACTUAL RESULTS
It shows root which is correct because i mentioned user: root in the docker compose. My problem is, i dont want to run as root, instead i want to run as regular user or atleast a previliged user with sudo access, but definitely not root.
ADDITIONAL INFORMATION
I tried running the compose by mentioning user: awxuser, but it throws the error:
"
Unable to find user awxuser: no matching entries in passwd file
"
Note: ‘awxuser’ is created in the host os and assigned to ‘docker’ group.
Any help from you guys is really appreciated. Got stuck up with this issue since more than a week. Pls help me. Thanks