dive/internal/source
Alex Goodman c35d7fec06
find the dive build Dockerfile from the build context only
- `--file=X` and `-fX` weren't recognized as a given Dockerfile, so dive searched for a default one and failed when the context had none
- every arg was checked for a directory holding a Dockerfile, flag values included: `dive build -t app .` with `./app/Dockerfile` present built `app/Dockerfile` against `.`
- stdin (`-`) and URL contexts always failed without `-f`
- the args are now walked as docker flags to find the actual context (the last positional arg), and only that directory is searched for a Containerfile/Dockerfile. When nothing is found, no `-f` is added and docker decides

Co-authored-by: tgolob <34978067+tgolob@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
2026-11-16 23:49:15 -05:00
..
build.go find the dive build Dockerfile from the build context only 2026-11-16 23:49:15 -05:00
build_test.go find the dive build Dockerfile from the build context only 2026-11-16 23:49:15 -05:00
docker.go port image loading and analysis to stereoscope (#727) 2026-10-30 10:37:51 -04:00
docker_test.go add regression tests for issues resolved by the stereoscope port (#740) 2026-11-16 23:48:33 -05:00
ocidir_test.go add regression tests for issues resolved by the stereoscope port (#740) 2026-11-16 23:48:33 -05:00
platform_test.go add regression tests for issues resolved by the stereoscope port (#740) 2026-11-16 23:48:33 -05:00
podman.go port image loading and analysis to stereoscope (#727) 2026-10-30 10:37:51 -04:00
podman_test.go add regression tests for issues resolved by the stereoscope port (#740) 2026-11-16 23:48:33 -05:00
registry_test.go add regression tests for issues resolved by the stereoscope port (#740) 2026-11-16 23:48:33 -05:00
source.go port image loading and analysis to stereoscope (#727) 2026-10-30 10:37:51 -04:00
source_test.go port image loading and analysis to stereoscope (#727) 2026-10-30 10:37:51 -04:00