Sam
Sam

Reputation: 873

Connect to windows image fails with cmd

I have created a docker image from my windows 7 tar backup. Everything is fine and docker images shows the image. Now, I do not know how to create a container from this image. It seems it does not know the cmd command at all. I tried the following:

# docker run -it 8bf47055c3d3 cmd
exec: "CMD": executable file not found in $PATH
docker: Error response from daemon: Container command not found or does not exist..


s# docker run -it 8bf47055c3d3 "Windows\System32\cmd.exe"
exec: "CMD": executable file not found in $PATH
docker: Error response from daemon: Container command not found or does not exist..

Is there any way to connect?

Upvotes: 0

Views: 446

Answers (1)

VonC
VonC

Reputation: 1324138

I did not create any Dockerfile. Just took a .tgz backup of the windows C:\ drive and ran the following command in my Linux to create the image:

cat file.tgz | docker import - devops:latest

I don't understand what you hope to do with this image.
Docker, used on Windows, is used in a boot2docker (tinycore) VM, where it can run container based on Linux images. It would not know how to interpret Windows system calls.

You would need docker for Windows (Windows 10 with Hyper-V maybe, or Windows Server 2016 TP4+, as in "Running Docker Containers On Windows Server 2016 (Quick Start Guide)") to hope running such an image.

Upvotes: 1

Related Questions