docker path_encoding ai_generated true

error: failed to solve: failed to read dockerfile — Korean characters in build context path

ID: docker/build-context-korean-path-failure

Also available as: JSON · Markdown
85%Fix Rate
88%Confidence
4Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
24 active

Root Cause

Docker build fails when Dockerfile or build context is in a directory with Korean/non-ASCII characters.

generic

Workarounds

  1. 92% success Run docker build from an ASCII-only path using absolute Dockerfile path
    cp Dockerfile /tmp/build/ && docker build -f /tmp/build/Dockerfile .

    Sources: https://docs.docker.com/engine/reference/commandline/build/

  2. 88% success Create a symlink with ASCII name pointing to the Korean-named directory
    ln -s /home/유저/프로젝트 /tmp/project && docker build /tmp/project

    Sources: https://docs.docker.com/engine/reference/commandline/build/

Dead Ends

Common approaches that don't work:

  1. Escape the Korean characters in the docker build command 90% fail

    Docker CLI does not support escaped Unicode paths in -f flag

  2. Use DOCKER_BUILDKIT=0 to fall back to legacy builder 80% fail

    Legacy builder has the same path encoding limitation