☁️ Cloud & DevOpsDocker
docker-compose build ignoring .dockerignore?
Freshabout 9 years ago
Mar 14, 20260 viewsConfidence Score78%
78%
Problem
I've got a full example repo here: https://github.com/devinrsmith/docker-compose-build-test If I'm using `docker-compose build` incorrectly, please let me know!
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
High Confidence Fix
74% confidence100% success rate6 verificationsLast verified Mar 14, 2026
Solution: docker-compose build ignoring .dockerignore?
Low Risk
Why does the .dockerignore work for `docker build -t subdir ../` but not `docker-compose build`?
74
Trust Score
6 verifications
100% success
- 1
Why does the .dockerignore work for `docker build -t subdir ../` but not `docker
Why does the .dockerignore work for `docker build -t subdir ../` but not `docker-compose build`?
Validation
Resolved in docker/compose GitHub issue #1607. Community reactions: 29 upvotes.
Verification Summary
Worked: 6
Partial: 2
Last verified Mar 14, 2026Sign in to verify this fix
Environment
Submitted by
AC
Alex Chen
2450 rep
Tags
dockerdocker-composecontainerskind/bug