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
Pushing to registry.exe running in Windows TP5 container panics #1732
Comments
The fileystem backend does not appear to currently support windows. If it was to be updated to support windows then the use of |
Interesting. Looks like the panic is in the golang runtime, and is triggered by calling
If I had to guess, I'd say this is triggered by the filesystem driver's use of
Would you be able to try this change and see if it fixes the problem? |
(As an aside, it's a little ironic that the panic trace apparently triggered by wrongly using slash-based paths shows slash-based paths for source files.) |
Thanks for the tips. A GO binary, like most languages, on Windows is capable using I did another test on my first TP5 machine by using the same path in container as on the host:
With this I can push docker images. My previous setup was
and this panicked. I'll have a close look what is the reason. |
But this is not reproducible that it works with that data directory. After stopping the container, moving old data away, creating a new C:\registry directory and running a new container it also doesn't work pushing an image. |
Still the same with registry 2.5.1. It works fine inside a container if
I've seen a similar issue with Node.js running inside a volume mount. |
This is down to issue 15978 in Go. Windows Server 2016 reports the underlying location for a SYMLINKD in a different format from previous versions. A fix has been merged into master, which I have verified this with a custom Go build @0bae74e to produce a custom registry build @v2.6.0-rc.1 - volumes and host mounts work correctly. The fix will be in the 1.8 release (expected February 2017). I don't see we can produce a stock registry build on Windows until the official release, but I will put my custom build on the Hub. |
Thanks for the link. I'll compare that with the problem with Node.js/libuv I'm struggling with. So we could build Go from source in a container to build registry in a container. |
Exactly, yes. That's what I'm looking at now. Until then, the manually built image is available: sixeyed/registry. |
@sixeyed Awesome. Just updated my demo scenario, it's so easy with docker just replacing the image name. |
It seems that registry also needs the fix in upcoming Golang version. A Docker image with Registry 2.6.1 built with Golang 1.8 has a strange "first container" problem in a fresh VM. See StefanScherer/dockerfiles-windows#143 for details. |
Compiling registry 2.6.2 with Golang 1.9 fixes the problem. Building and testing the docker image in AppVeyor works fine with a mapped volume: https://ci.appveyor.com/project/StefanScherer/dockerfiles-windows/build/1.0.746 |
This might be very experimental, but I encounter the following problem running a Docker registry inside a Windows container on a TP5 machine:
level=panic msg="runtime error: slice bounds out of range"
My setup of a Docker swarm and local registry can be found here: https://github.com/StefanScherer/docker-windows-box/tree/master/swarm-demo
The registry docker image is built with this Dockerfiles: https://github.com/StefanScherer/dockerfiles-windows/tree/master/registry
I only once had success pushing an image to the registry, but most of the time I get the following error.
The text was updated successfully, but these errors were encountered: