-
Notifications
You must be signed in to change notification settings - Fork 1.7k
.dockerignore whitelist rules not respected #2576
Copy link
Copy link
Closed
Labels
build/dockerhelp wantedWe would love to have this done, but don't have the bandwidth, need help from contributorsWe would love to have this done, but don't have the bandwidth, need help from contributorskind/bugSomething isn't workingSomething isn't working
Description
Expected behavior
Skaffold calls docker build directly so that .dockerignore file is applied as expected, including whitelist rules like
**
!/.gitmodules
!/CMakeLists.txt
!/etc/**
!/CPlusPlusCode/**
!/submodules/**
which is the recommended approach – only sync what belongs to the build to avoid rebuilds.
Actual behavior
In the above .dockerignore example, only
.gitmodules
CMakeLists.txt
Dockerfile
get transmitted in the Docker context. Far from expectation.
Information
- Skaffold version: 0.34.1
- Operating system: macOS
- Contents of skaffold.yaml:
apiVersion: skaffold/v1beta13
kind: Config
build:
artifacts:
- image: skaffold-dockerignore-issue
docker: {}
tagPolicy:
gitCommit:
variant: AbbrevCommitShaSteps to reproduce the behavior
See full example project at: https://github.com/AndiDog/skaffold-dockerignore-issue
Why this is important
Because builds are different in Skaffold vs. raw Docker CLI, and the good-practice whitelisting approach in .dockerignore is fully unusable.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
build/dockerhelp wantedWe would love to have this done, but don't have the bandwidth, need help from contributorsWe would love to have this done, but don't have the bandwidth, need help from contributorskind/bugSomething isn't workingSomething isn't working