These days, I made a dockerfile. The command is :Then built the dockerfile, it showed :tar (child): nginx-1.8.0.tar.gz: Cannot read: Is a directorytar (child): At beginning of tape, quitting nowtar (child): Error is not recoverable: exiting nowgzip: stdin: unexpected end of filetar: Child returned status 2tar: Error is not recoverable: exiting nowThe command '/bin/sh -c cd /usr/local/src/ &&  tar zxvf nginx-1.8.0.tar.gz' returned a non-zero code: 2Then I guessed that it maybe had been made the workfile in docker container. Then I used the command:docker rm -f $(docker ps -a -q) to delete the containers, and I also deleted the images which is not succeed to create. Then I also built the dockerfile, but it also showed this questions. I don't know how to deal with it.Finally, someone guess that it maybe created the workfile of nginx-1.8.0.tar.gz in host, but I don't know what's mean.Thank you. Please forgive my poor Chinese English.
dockerfile tar can not read:Is a directory
tar;docker
You should use COPY instead of ADD. Check this linkCheck the ADD and COPY documentations for an exhaustive description of their behaviours. ADD and COPY are functionally similar, generally speaking, COPY is preferred. Thats because its more transparent than ADD. COPY only supports the basic copying of local files into the container, while ADD has some features that are not immediately obvious.ADD allows  to be an URL If the  parameter of ADD is an    archive in a recognised compression format, it will be unpacked