Docker Community Forums

Share and learn in the Docker community.

Docker build fails with re-exec error: exit status 1:

docker build fails with re-exec error: exit status 1: msg=“hcsshim::ImportLayer failed in Win32: The system cannot find the path specified. (0x3) folder=C:\ProgramData\docker\tmp\hcs174537235” archive/tar: invalid tar header

Expected behavior

docker image is built using microsoft/mssql-server-windows-developer:2017-CU1 and 2 database files (mdf,ldf) are copied into the image at build time.

Actual behavior

dockerd.exe errors out when trying to copy in one of the database mdf files.

Information

Don’t have DockerDebugInfo.ps1 since this is docker ee on Windows Server 2016. I hope I am posting in the correct forum.

Docker Info output:

Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 4
Server Version: 18.09.5
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: ics l2bridge l2tunnel nat null overlay transparent
Log: awslogs etwlogs fluentd gelf json-file local logentries splunk syslog
Swarm: inactive
Default Isolation: process
Kernel Version: 10.0 14393 (14393.2906.amd64fre.rs1_release_inmarket.190401-1809)
Operating System: Windows Server 2016 Datacenter Version 1607 (OS Build 14393.2906)
OSType: windows
Architecture: x86_64
CPUs: 2
Total Memory: 16GiB
Name: WSP-UTL-DKR-01
ID: 4SVD:K2WX:ZRGJ:SIOR:3SUI:RJ3B:OVGK:YUHV:LLPL:GYZK:EAVA:52UP
Docker Root Dir: C:\ProgramData\docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: -1
Goroutines: 24
System Time: 2019-05-03T15:17:55.5878693-07:00
EventsListeners: 0
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false


Dockerfile contents:

building our new image from the microsft SQL 2017 image

FROM microsoft/mssql-server-windows-developer:2017-CU1

creating a directory within the container

RUN mkdir -p /SQLServer

copying the database files into the container

no file path for the files so they need to be in the same location as the dockerfile

COPY RBDMS_Logging.mdf /SQLServer
COPY RBDMS_Logging_log.ldf /SQLServer

COPY RBDMS_Core.mdf /SQLServer
COPY RBDMS_Core_log.ldf /SQLServer

ENV attach_dbs=’[{“dbName”:“RBDMS_Logging”,“dbFiles”:[“C:\SQLServer\RBDMS_Logging.mdf”,“C:\SQLServer\RBDMS_Logging_log.ldf”]},{“dbName”:“RBDMS_Core”,“dbFiles”:[“C:\SQLServer\RBDMS_Core.mdf”,“C:\SQLServer\RBDMS_Core_log.ldf”]}]’


Folder contents of what is being built:

Mode LastWriteTime Length Name


-a---- 4/30/2019 3:46 PM 709 dockerfile
-a---- 5/3/2019 2:21 AM 9166127104 RBDMS_Core.mdf
-a---- 5/3/2019 2:21 AM 4071424 RBDMS_Core_log.ldf
-a---- 5/3/2019 2:20 AM 5242880 RBDMS_Logging.mdf
-a---- 5/3/2019 2:20 AM 6103040 RBDMS_Logging_log.ldf
-a---- 12/10/2018 2:02 PM 383 README.txt


daemon.json

{
“debug”:true,
“storage-opts”:[
“size=40G”,
“dm.baseimage=20GB”
]
}

Steps to reproduce the behavior

  1. docker login
  2. remove dangling images
  3. docker build -t “$($repository):$dbImageTag” --isolation=hyperv --rm $imageDatabases

Output from commands:

Login Succeeded
Deleted: sha256:1f82c1c53aba7d031bb841a5b9d224725cfc040856736400837432fa31af9323
Deleted: sha256:a38dc11b172f001503cf68c9307a038ba62dba864e29a51a3a843be90398f9cb
Deleted: sha256:b9e847ca0522f5781a92006b5a1fa62aa8fa08a6efff233f545b7b90da889a16
Deleted: sha256:32a171dfa60aea846db0caac9ce5f44d7f8d7a652849ab52fed413e6ebfc6037
Deleted: sha256:e3eba92a0ca32310cfd6f68fe85b62a92041cf66fa224ea7e429ea40ce61d43a
Deleted: sha256:a1ffd5fce4f9a294497b0a143d7bd4950ee99bc40794a668af5823eb67e62608
REPOSITORY TAG IMAGE ID CREATED SIZE
microsoft/mssql-server-windows-developer 2017-CU1 6b99f94dc0c3 18 months ago 14.5GB

Sending build context to Docker daemon 18.13GB

Step 1/7 : FROM microsoft/mssql-server-windows-developer:2017-CU1
—> 6b99f94dc0c3
Step 2/7 : RUN mkdir -p /SQLServer
—> Running in 7d9bce97f8a6

Directory: C:\

Mode LastWriteTime Length Name


d----- 5/3/2019 2:34 PM SQLServer

Removing intermediate container 7d9bce97f8a6
—> 02b8b3f473cb
Step 3/7 : COPY RBDMS_Logging.mdf /SQLServer
—> b4eb716df286
Step 4/7 : COPY RBDMS_Logging_log.ldf /SQLServer
—> 98ef3c037ebb
Step 5/7 : COPY RBDMS_Core.mdf /SQLServer
re-exec error: exit status 1: output: time=“2019-05-03T14:54:18-07:00” level=error msg=“hcsshim::ImportLayer failed in W
in32: The system cannot find the path specified. (0x3) path=\\?\C:\ProgramData\docker\windowsfilter\6fcbed1ec4320
f147b1e757b5ccdd311c78716fb24471de89700605adb07651c folder=C:\ProgramData\docker\tmp\hcs174537235”
archive/tar: invalid tar header

REPOSITORY TAG IMAGE ID CREATED SIZE
98ef3c037ebb 23 minutes ago 14.7GB
microsoft/mssql-server-windows-developer 2017-CU1 6b99f94dc0c3 18 months ago 14.5GB


Additional details:

This same process works for another image that is identical except for the contents of the database files that are copied in and mounted. The database file that works is a subset of the one that does not work with some additional test data in it.

As you can see, we have tried some different storage-opts properties in the daemon.json, but I am not sure that is doing much other than making the images larger by default.

My current theory is that docker is running out of sandbox space to create the image, but I am unable to expand that properly to get my build to work.

The drive that docker is running on has over 80GB free, so storage space is currently not an issue.

Any help with this issue is greatly appreciated!