Docker Community Forums

Share and learn in the Docker community.

Docker import from a Windows filesystem tarball


#1

I have a tarball created from the Windows partition of a Windows 2016 server core VM. I am trying to use docker import on this tarball to generate a container image on a Windows 2016 server. This is something that I have confirmed works for Linux with an Ubuntu Apache server where I was able to create a tarball of the Ubuntu filesystem, import it using “docker import” as a container image, run a container from the image and confirm apache fucntionality.

I notice that docker import on Windows 2016 server consistently fails with an error indicating the following:

PS C:\Users\Administrator\Downloads\win2016-sc> docker import .\win2016-sc.tar
Error response from daemon: re-exec error: exit status 1: output: Failed to safefile.OpenRelative failed in Win32: open \\?\C:
\ProgramData\docker\windowsfilter\fca4355e0df2b6dc6a111d5c2684967c8ac21d4176ba9433a8ff71b7f005687e: The filename, directory na
me, or volume label syntax is incorrect. (0x1f) .\

The docker version in use is the following:

Client:
 Version:           18.09.1
 API version:       1.39
 Go version:        go1.10.6
 Git commit:        20b67756d0
 Built:             unknown-buildtime
 OS/Arch:           windows/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.09.1
  API version:      1.39 (minimum version 1.24)
  Go version:       go1.10.6
  Git commit:       20b67756d0
  Built:            01/09/2019 17:09:57
  OS/Arch:          windows/amd64
  Experimental:     false

Note that I have tried the same with Docker on a Windows server 2019 VM as well and I get the same error in creating the container image with “docker import”.

  1. Is “docker import” on filesystem tarballs broken on Windows?
  2. Is the container image creation for Windows special/different from Linux in a way where creating it via docker import from a Windows filesystem will not work?

Additional info on the tarball: The windows filesystem tar was created on a Linux machine that had the windows volume attached to it, using the ‘tar’ command. Sample output on the contents of the tar file:

PS C:\Program Files\7-Zip> .\7z.exe l C:\Users\Administrator\Downloads\win2016-sc\win2016-sc.tar | Out-Host -paging

Scanning the drive for archives:
1 file, 9628682240 bytes (9183 MiB)

Listing archive: C:\Users\Administrator\Downloads\win2016-sc\win2016-sc.tar

--
Path = C:\Users\Administrator\Downloads\win2016-sc\win2016-sc.tar
Type = tar
Physical Size = 9628682240
Headers Size = 149356032
Code Page = UTF-8

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
2019-01-26 11:52:01 D....            0            0  .
2019-01-10 00:13:19 D....            0            0  .\$RECYCLE.BIN
2019-01-09 23:51:19 D....            0            0  .\Boot
2019-01-09 23:51:25 D....            0            0  .\Boot\lv-LV
2016-12-14 18:33:39 .....        75616        75776  .\Boot\lv-LV\bootmgr.exe.mui
2019-01-26 11:53:54 .....        24576        24576  .\Boot\BCD
2016-12-14 18:44:57 .....        32768        32768  .\Boot\BCD.LOG
2016-12-14 18:44:57 .....            0            0  .\Boot\BCD.LOG1
2016-12-14 18:44:57 .....            0            0  .\Boot\BCD.LOG2
2019-01-09 23:51:25 D....            0            0  .\Boot\bg-BG
2016-12-14 18:33:37 .....        77664        77824  .\Boot\bg-BG\bootmgr.exe.mui

...
2016-07-16 13:18:03 D....            0            0  .\Program Files\WindowsPowerShell\Modules
2016-07-16 13:18:03 D....            0            0  .\Program Files\WindowsPowerShell\Modules\Microsoft.PowerShell.Operation.Validation
2016-12-14 18:34:22 D....            0            0  .\Program Files\WindowsPowerShell\Modules\Microsoft.PowerShell.Operation.Validation\1.0.1
2016-07-16 13:18:03 D....            0            0  .\Program Files\WindowsPowerShell\Modules\Microsoft.PowerShell.Operation.Validation\1.0.1\Diagnostics
...

Appreciate any inputs on this.