blackraven
blackraven

Reputation: 33

How to pull docker windows_image on Linux hosted local Registry

I'm trying to set up a local Docker Registry to keep there both Windows and Linux images. AFAIK there is no Windows docker image for Registry. So I can't set up my own registry on Windows host. Am I right?

Ok, I set up a linux box, got there a registry:

# docker version
Client:
Version:           18.09.0-ce
API version:       1.39
Go version:        go1.10.8
Git commit:
Built:             Mon Jan 28 16:51:31 2019
OS/Arch:           linux/amd64
Experimental:      true

Server:
Engine:
 Version:          dev
 API version:      1.39 (minimum version 1.12)
 Go version:       go1.10.8
 Git commit:       4d60db4/18.09.0
 Built:            Thu Jan 17 13:27:44 2019
 OS/Arch:          linux/amd64
 Experimental:     true

# docker ps
CONTAINER ID        IMAGE                                COMMAND                  CREATED             STATUS                          PORTS                    NAMES
7db5178d0215        registry                             "/entrypoint.sh /etc…"   20 hours ago        Up 4 minutes                    0.0.0.0:5000->5000/tcp   MyReg

and then I want to pull there a windows tagged image NOT to run, just to put there my own tag and let my users to pull it from me after that. But I can't because the architect problem. I've already set both the engine and the client to Experimental but still get this error:

# docker pull --platform windows/amd64 hello-seattle
Using default tag: latest
latest: Pulling from library/hello-seattle
image operating system "windows" cannot be used on this platform

So the questions are:

1. Can I have one registry to keep there Linux AND Windows images simultaneously?

2. How should I properly pull Windows tagged image onto linux hosted docker registry to keep it there and redistribute after?

Upvotes: 0

Views: 355

Answers (1)

user2663901
user2663901

Reputation: 53

Ran into sort of same problem, so following just to hear a solution.

I noticed that stefanscherer on docker hub has an docker registry image for windows, but i dont like to run unofficial images.

In my case i'm building an asp.net core application that builds an aspnet:60 base docker image that supports both linux and windows. I want the build/deployment process to run on a dedicated build host, which seems have to be installed with a windows OS to build windows containers.

I like to keep my docker registry local instead of using docker hub (at least until it reaches some production ready state). I believe i have to install a linux host as well in order to host a docker registry or build the docker registry from source for windows.

Upvotes: 1

Related Questions