Docker.io for Windows [closed]

2019-03-07 19:06发布

I was reading a nice question about docker - answer has overview of docker implementation details. I was wondering if anything like this is possible to do on Windows platform.

  • Do Windows alternatives for Docker exist?
  • Is it theoretically possible to use other (Windows based) components to build it?

Update1:

Update2::

For info how to install docker on windows (unrelated) - official docs has great instructions how to set up the environment by using boot2docker VM.

9条回答
在下西门庆
2楼-- · 2019-03-07 19:47

Microsoft is working on their own Hyper-V Container that is similar to Docker - Azure also supports the Docker infrastructure.

That aside, it's hard to give precise alternatives but on the Windows side we've had App-V for quite a long time which virtualises and sand-boxes applications so they can be run or streamed without being actually installed on a specific system. I've never meddled with it but it seems to be able to run as a standalone client without any need of the intricate server infrastructure usually involved for anything Microsoft.

From another perspective the disk image format used by Windows (VHD) supports standard differencing so you can easily run many virtual machines from a single read-only OS image where each virtual machine have a tiny write image to handle the differences. These are still fullblown virtual machines though.

查看更多
太酷不给撩
3楼-- · 2019-03-07 19:48

I have found that at least file system related functionality has Windows (7,8) already in place. One can use VHD files (virtual disks) for handling "images" concept in Docker. These image are used for virtual machine but can be created/attached/used directly by Windows too:

diskpart
DISKPART> create vdisk file=c:\base-image.vhd maximum=200 type=expandable

New image can be layered on top of base image:

DISKPART> create vdisk file=c:\image-2.vhd parent=c:\base-image.vhd

See more information about managing virtual disks.

Unfortunately, process lightweight isolation/sandboxing is probably not possible (at least not simple), although some methods do exists (http://www.sandboxie.com/, Native Client in Google Chrome ...)

查看更多
手持菜刀,她持情操
5楼-- · 2019-03-07 19:58

If you're just searching for a way to deploy a pre-packaged set of applications in some sort of container for Windows, with registry and file access being virtualized but without using a full-blown virtual machine image, these (commercial) sandbox-like applications might be worth looking at:

Edit: There's a new kid on the block, Spoon supports containers for Windows, and it actually looks very promising.

查看更多
我命由我不由天
6楼-- · 2019-03-07 20:03

Hyper-V is only on Windows Pro. Install it for £110.

Or simply install Vagrant, install VirtualBox, install GIT bash, then from your GIT bash terminal.

git clone git@github.com:danday74/vagrant-docker-skelly.git
cd vagrant-docker-skelly
vagrant up # takes approx 5 mins to create VM
vagrant ssh
docker -v
docker-compose -v

The Vagrantfile shows that:

1 - this is a Xenial VM with docker and compose installed on it

2 - Ports mapped from Host to the VM are 9900-9920

3 - The shared folder is shared from host to VM

Tweak this as desired.

查看更多
爷的心禁止访问
7楼-- · 2019-03-07 20:05

I got tired fighting with a maven docker plugin so I figured I would be able to fake it. This is how:

Using boot2docker and the following bat file makes it look like you're running docker natively. Place it on your path.

@set SSH="C:\Program Files (x86)\Git\bin\ssh.exe"
@set RUN_REMOTE='docker %*'
@ %SSH% -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 2022 -i %HOMEPATH%/.ssh/id_boot2docker -tt docker@localhost %RUN_REMOTE%

The ssh.exe comes from the msys-git package which is bundled with boot2docker. I'm pretty sure this solution have quite a few caveats, but it works pretty good for me. Place this file on your path and bob's yer uncle.

查看更多
登录 后发表回答