Skip to content

Windows multi-stage builds broken in 19.03.1 #4349

@pbering

Description

@pbering
  • I have tried with the latest version of my channel (Stable or Edge)
  • I have uploaded Diagnostics
  • Diagnostics ID: FBE0859A-7747-4099-9C4D-E97F0513F17F/20190731191818

Expected behavior

Able to build multi-stage Windows images

Actual behavior

Fails with:

Step 6/7 : COPY --from=builder ["C:/install/test.txt", "C:/install/"]
failed to copy files: mkdir \\?: The filename, directory name, or volume label syntax is incorrect.

Information

  • Multi-stage builds was working fine on previous stable version: 18.09.0
  • Windows Version: Windows 10 Enterprise 1903, build 18362.239
  • Docker Desktop Version: 2.1.0.0

Steps to reproduce the behavior

Can be reproduced with this dockerfile:

FROM mcr.microsoft.com/windows/servercore:1903 as builder

RUN MKDIR C:\install
RUN ECHO 'test' > C:\install\test.txt
RUN DIR C:\install

FROM mcr.microsoft.com/windows/servercore:1903

# FAILS!
COPY --from=builder ["C:/install/test.txt", "C:/install/"]

RUN DIR C:\install

Build with: docker image build --tag test .

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions