-
Notifications
You must be signed in to change notification settings - Fork 74
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
Execution of scripts in containers #13
Comments
Expected behavior, Docker volumes will not redefine the user id and by default container force-drops privileges to uid 1000 as Termux doesn't allow to use package manager as root and in general is not designed to work with superuser privs. You can try to use uid 0 (root).
|
Thanks for the explanation. FTR, |
@umarcor As I wrote, Termux does not allow use of package manager as root. This is not subject for fixing as intended behavior. |
@xeffyr I think there was a misunderstanding. I was not suggesting you to use the workaround. I wrote it for the record, so that other users are aware that the following does work: docker run \
-v $(pwd):/data/data/com.termux/files/home/src \
-w /data/data/com.termux/files/home \
--entrypoint /data/data/com.termux/files/usr/bin/sh \
xeffyr/termux:aarch64 \
-c 'cp -r src work; ./work/test_script.sh' Note the last line: https://github.com/hdl/Termux-packages/blob/feat/ci/.github/workflows/Test.yml#L52 |
I am trying to execute a test script inside the aarch64 container, which updates the system and clones a git repo.
By default, these containers' entrypoint is
login
. Hence, executing commands non-interactively requires overriding the entrypoint. This is the execution command I tried:The container is properly started, the system is updated and git is installed. However,
mkdir
fails with a permission denied error. Upon further inspection,ls -la
shows that the bind directory is owned by userradio
, instead ofsystem
.See:
The text was updated successfully, but these errors were encountered: