Inside Docker tar extract failed ,If use the option "-O"

My practical experience has been that it’s better to extract content like this in the Dockerfile, in a RUN command. The on-disk storage space is the same (especially if you’re docker save into a tar file that will be compressed anyways), and doing this in an entrypoint script adds complexity and startup time.

I’m pretty sure this means what it says: whatever file is in /tmp/FILENAME.tgz in the container doesn’t have a member named FILENAME.tgz. You might add a line like tar tvzf /tmp/FILENAME.tgz before this in the entrypoint script to dump out what’s in the tar file.