Weird behavior with --context
and docker WORKDIR
#2021
Labels
area/context
categorized
cmd/workdir
differs-from-docker
has-repro
issue/files-mounted-unexpectedly
kind/bug
Something isn't working
priority/p0
Highest priority. Break user flow. We are actively looking at delivering it.
priority/p1
Basic need feature compatibility with docker build. we should be working on this next.
Actual behavior
Dockerfile content
Run this build command
Expected behavior
I'd expect ls should have no output since we haven't copied any files into the docker build yet
from my investigation this bug happens when dockerfile uses WORKDIR to cd into the same directory as the local --context directory
this behaves as intended if we mount $(pwd) to /workspace2 or use
WORKDIR /workspace2
in dockerfileI think this is a pretty serious bug because I definitely didn't expect kaniko's context to be copied into docker build process at all and there was nothing in the doc that explained this behavior.
Triage Notes for the Maintainers
--cache
flagThe text was updated successfully, but these errors were encountered: