Can't create a docker image for COPY failed: stat /var/lib/docker/tmp/docker-builder error
You should put those files into the same directory with Dockerfile.
Check if there's a .dockerignore
file, if so, add:
!mydir/test.json!mydir/test.py
- Q1: Check your
.dockerignore
file in build path, the files or dir you want to copy may be in the ignore file list! - Q2: The COPY directive is based on the context in which you are building the image, so be aware of any problems with the directory where you are currently building the image! See: https://docs.docker.com/engine/reference/builder/#copy