lite icon indicating copy to clipboard operation
lite copied to clipboard

Add Dockerfile

Open fabpot opened this issue 1 year ago • 4 comments

fabpot avatar Mar 02 '24 13:03 fabpot

Just wanted to report that I checked out this branch and was able to build the image successfully (docker build .) using Colima 0.7.5 on macOS Sonoma 14.7.

phenaproxima avatar Oct 22 '24 20:10 phenaproxima

However...when I tried to run this command:

docker run --rm -v $PWD:/data phenaproxima/splitsh:test --prefix=project_template/

(phenaproxima/splitsh:test is just my local tag name for the built image), I got this:

config value 'safe.directory' was not found

Did I do something wrong?

phenaproxima avatar Oct 22 '24 20:10 phenaproxima

I got past the safe.directory error by altering the Dockerfile to copy a gitconfig file into /etc:

safe.directory="*"

But then I ran into this: repository path '/data/' is not owned by current user when I ran docker run --rm -v $PWD:/data IMAGE_ID --prefix=project_template/

phenaproxima avatar Oct 22 '24 22:10 phenaproxima

Got this to work by using the hack in https://github.com/libgit2/libgit2/issues/6663#issuecomment-1843619580.

docker run --rm -v $PWD:/data -e SUDO_UID=$(id -u) 7343ebd3ff68 --prefix=project_template/
16 commits created, 403 commits traversed, in 446ms
00167c4d8f10aae004462f4ad3dd697e0c6e5d69

phenaproxima avatar Oct 22 '24 23:10 phenaproxima