Closed markfaine closed 3 years ago
Update, it wasn't hanging, it was just fixuid taking forever, however, it still fails to run the command with the same error.
That sounds like you're missing a command -- what is "$@"
set to? I'd
suggest running the script with set +x
so you can see the full command
being run.
Thanks, excellent idea. I'm getting closer I think. Do you know what could be causing this error?
+ TZ=CST6CDT
+ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/virtualenv/bin
+ ANSIBLE_CONFIG=/home/ansible/ansible.cfg
+ export TZ PATH ANSIBLE_CONFIG
+ /usr/local/bin/fixuid -q
export HOME="/home/ansible"
+ /usr/sbin/gosu ansible:ansible bash -c /wrapper.sh
error: failed switching to "ansible:ansible": operation not permitted
That sounds like you're either not running as root or you've got something else (seccomp, apparmor, etc) blocking your ability to switch your effective UID.
I'm going to close since this isn't something I can reproduce. :sweat_smile:
I'm exec-ing a script as my container's entrypoint, the script does some setup (still as root) and then at the end I call:
However, it just hangs, regardless of the command I pass to the container. When I do a ctrl-c I see the usage help for gosu.
Is there something wrong with the way I'm executing gosu?
Thanks