moby / moby/buildkit

progress: if not escaped, backslashes `\` not printed on the progress stream dockerfile steps

Open
#5,250 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/cli exp/beginner
Dominant language
Go
Stars
10.3k
Forks
1.5k
Avg merge
1d 23h
Merged PRs (30d)
48

Description

However, prints when escaped or put within "..":

Minimal repro dockerfile:

FROM mcr.microsoft.com/windows/nanoserver:ltsc2022

RUN echo C:\hello\world\path
RUN echo C:\\hello\\escaped\\path
RUN echo "C:\hello\quoted\path"

Result:

#5 [2/4] RUN echo C:helloworldpath
#5 1.359 C:\hello\world\path
#5 DONE 1.7s

#6 [3/4] RUN echo C:\hello\escaped\path
#6 1.734 C:\\hello\\escaped\\path
#6 DONE 2.1s

#7 [4/4] RUN echo "C:\hello\quoted\path"
#7 1.765 "C:\hello\quoted\path"
#7 DONE 2.1s

With classic docker build:

Result:

Step 2/4 : RUN echo C:\hello\world\path
 ---> Running in 94d37a87e491
C:\hello\world\path
 ---> Removed intermediate container 94d37a87e491
 ---> b098d8792b7c
Step 3/4 : RUN echo C:\\hello\\escaped\\path
 ---> Running in d2fcea089fb1
C:\\hello\\escaped\\path
 ---> Removed intermediate container d2fcea089fb1
 ---> e6c9869a97f8
Step 4/4 : RUN echo "C:\hello\quoted\path"
 ---> Running in 2e2c603aebe2
"C:\hello\quoted\path"
 ---> Removed intermediate container 2e2c603aebe2
 ---> 56ba89eb540e

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files or tests are named. Start by tracing BuildKit's progress-stream handling for Dockerfile RUN commands and compare it with the classic docker build output using the provided Windows Dockerfile. Done means unescaped backslashes remain visible in progress output, while escaped and quoted cases retain their current behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
dockerfile, go
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.