I have done the following
Steps to reproduce
cd "$(mktemp -d)"
cat > Dockerfile <<'EOF'
FROM debian:stable-slim
COPY . .
RUN cat Dockerfile
EOF
container build
The build fails with:
cat: Dockerfile: No such file or directory
The same happens with:
But this succeeds:
In my specific example reproduction, the mktemp -d resolved to /var/folders/qf/ng024_6s5kn4z_sczdcdbbkh0000gn/T/tmp.3tuwoUOXS3.
Problem description
When building from a temporary directory created with mktemp -d, the build context appears to be empty if the context is specified implicitly or as ..
The following commands all produce an empty build context:
container build
container build .
However, providing the exact same directory as an absolute path works:
container build "$PWD"
The behavior does not occur when building from a normal directory such as ~/test.
Environment
- OS: ProductName: macOS
ProductVersion: 26.5.2
BuildVersion: 25F84
- Container: container CLI version 1.0.0 (build: release, commit: ee848e3)
Code of Conduct
I have done the following
Steps to reproduce
The build fails with:
The same happens with:
container build .But this succeeds:
container build "$PWD"In my specific example reproduction, the
mktemp -dresolved to/var/folders/qf/ng024_6s5kn4z_sczdcdbbkh0000gn/T/tmp.3tuwoUOXS3.Problem description
When building from a temporary directory created with
mktemp -d, the build context appears to be empty if the context is specified implicitly or as..The following commands all produce an empty build context:
container buildcontainer build .However, providing the exact same directory as an absolute path works:
container build "$PWD"The behavior does not occur when building from a normal directory such as
~/test.Environment
Code of Conduct