[Bug]: `container build` under `/tmp` fails to copy directories
- Dominant language
- Swift
- Stars
- 49.9k
- Forks
- 1.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 22
Description
### I have done the following
- [x] I have searched the existing issues
- [ ] If possible, I've reproduced the issue using the 'main' branch of this project
### Steps to reproduce
```
mkdir -p /tmp/test
cd /tmp/test
mkdir -p srcdir
echo foo > srcdir/foo
cat > Dockerfile << 'EOF'
FROM docker.io/library/alpine:3.20
COPY srcdir /dstdir
RUN ls -al /dstdir
EOF
container build -t test -f ./Dockerfile --progress plain --no-cache .
```
`/dstdir/foo` file is missing.
### Problem description
File contents must be copied when `COPY srcdir /dstdir`.
### Environment
```markdown
- OS: macOS
- Xcode: 27.0
- Container: main
```
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Contributor guide
Research direction
Reproduce the failure with the provided /tmp/test commands and inspect the container build path handling the Dockerfile COPY instruction. Trace how a directory source is packaged and copied, then verify completion by rebuilding and confirming that /dstdir/foo contains foo.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dockerfile, swift
- Domain
- build-system, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 64/100