Fail to add files within a Dockerfile

Thomas Boerger's Avatar

Thomas Boerger

08 Jan, 2018 11:42 AM

We try to add built binaries within a Dockerfile, like this:

ADD drone-matrix.exe /drone-matrix.exe

But for the last builds the execution of `docker build -f -t plugins/matrix:windows .` fails hard with an error like this:

Sending build context to Docker daemon 3.072kB
Step 1/4 : FROM microsoft/nanoserver:10.0.14393.1593
 ---> 28dad12ef0bc
Step 2/4 : LABEL maintainer "Drone.IO Community <[email blocked]>" "Drone Matrix" org.label-schema.vendor "Drone.IO Community" org.label-schema.schema-version "1.0"
 ---> Running in bd7e376d0834
 ---> 4bcebabbebc4
Removing intermediate container bd7e376d0834
Step 3/4 : ADD drone-matrix.exe /drone-matrix.exe
docker : ADD failed: GetFileAttributesEx \\?\C:\Windows\TEMP\docker-builder566940906\drone-matrix.exe: The system cannot find the file specified.
At line:11 char:1
+ docker build -f -t plugins/matrix:windows .
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (ADD failed: Get...file specified.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
Command executed with exception: ADD failed: GetFileAttributesEx \\?\C:\Windows\TEMP\docker-builder566940906\drone-matrix.exe: The system cannot find the file specified.

Had there been some update the changed the Docker workspace? What is the proper way now to add files from the build directory to the Docker context?

  1. 1 Posted by Thomas Boerger on 08 Jan, 2018 11:43 AM

    Thomas Boerger's Avatar

    Just to reference a specific failing build:

  2. 2 Posted by on 08 Jan, 2018 02:00 PM's Avatar
  3. 3 Posted by Thomas Boerger on 09 Jan, 2018 10:33 AM

    Thomas Boerger's Avatar

    The strange thing is that different project with the same configuration and only a different file name are working fine.

  4. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:26 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac