ugit (via docker) does not resolve that it is in a git repo.
fargly opened this issue · comments
What happened?
Attempted invoking ugit via
docker pull bhupeshimself/ugit
docker run --rm -it -v $(pwd):/app bhupeshimself/ugit
Even in the ugit repo that has been cloned (or any other git repo), always get the following message:
Ummm, you are not inside a Git repo 😟
Test Repo
/home/auser/Projects/TestGitRepo
total 58
drwxrwxr-x 3 auser auser 4 Feb 5 15:45 .
drwxrwxr-x 300 auser auser 305 Feb 5 15:58 ..
drwxrwxr-x 8 auser auser 14 Feb 5 15:45 .git
-rwxrwxr-x 1 auser auser 147 Feb 5 15:44 ungitInvoke
Using the script directly works fine.
Maybe a missing environment variable or volume mapping that is unaccounted for?
Ugit Version
v5.1 (Latest)
Bash Version
Bash >= 5.0
Git Version
Whatever versions that are in the current docker image for all of the above.
❯ docker images
REPOSITORY | TAG | IMAGE ID | CREATED | SIZE |
---|---|---|---|---|
bhupeshimself/ugit | latest | 6c57f819c864 | 2 days ago | 14.9MB |
What OS are you seeing the problem on?
Linux Based
Terminal Name
SSH'ed into Ubuntu 22.04 host.
Code of Conduct
- I agree to follow this project's Code of Conduct
@fargly Thanks for reporting,
Can you try this variation of sharing file permission while starting a container
docker run --rm -it -u $(id -u):$(id -g) -v $PWD:/app bhupeshimself/ugit
Worked like a charm
❯ docker run --rm -it -u
$(id -u):$ (id -g) -v $PWD:/app bhupeshimself/ugit
Undo your last oopsie in Git 🙈️
Press ctrl+c to exit anytime
Thanks for your attention on this matter.
Also, that write up for a minimal bash docker image was very interesting.
Cheers