JonCubed / docker-jenkins-jnlp-slave-windows

Jenkins JNLP Slaves as Windows Container
MIT License
26 stars 21 forks source link

git\usr\bin binaries do not run in windows container #5

Open akomakom opened 6 years ago

akomakom commented 6 years ago

None of the executables under c:\Program Files\git\usr\bin** work in docker for me, including ssh.exe Do they work for anyone else?

ENV

Error

>docker run --rm -it --entrypoint cmd jonathank/jenkins-jnlp-slave-windows
C:\>"c:\Program Files\git\cmd\git.exe"  --version
git version 2.15.1.windows.2

C:\>"c:\Program Files\git\usr\bin\ssh.exe"

C:\>"c:\Program Files\git\usr\bin\ls.exe"

C:\>echo %ERRORLEVEL%
-1073741511

Same for every binary in that directory. Is this my issue or a global issue?

Due to this, Jenkins cannot check out using system git because ssh.exe doesn't work. I am using system git globally in Jenkins (and, as a consequence, in docker slaves) because of issues with JGit.

akomakom commented 6 years ago

In my testing, copying kernel32.dll from the host into the container resolves this issue. (Also, avoiding -t if using docker run).

I'd still like to know whether anybody else is experiencing this problem or if I'm doing something wrong.

JonCubed commented 6 years ago

@akomakom thanks for reporting this and updating with your findings. I've not being using ssh with Jenkins, so have not come across this issue before.