Pg_restore incomplete tar header

Hello new to docker and need help please:

os; ubuntu 18.04
Its trying to restore from a tar archive & run in exec.

1st command runs.
2nd fails.

↳ docker run --rm --name pg-docker -e POSTGRES_PASSWORD=docker -e POSTGRES_DB=dvdrental -d -p 5432:5432 -v $HOME/docker/volumes/postgres:/var/lib/postgresql/data postgres

Command below run from this location:
↱  ~/Public/db/postgresqltut>

↳ docker exec -it pg-docker tar -x0zf dvdrental.tar | pg_restore -U postgres -F t -d dvdrental
pg_restore: [tar archiver] incomplete tar header found (113 bytes)

Arch location:
↱  ~/Public/db/postgresqltut>
↳ ls -la
– files –

You untar the file and then call pg_restore with the -F t (= “The archive is a tar archive”) parameter.

Sorry for late reply but ended up using pg_restore to directly restore tar file. Had to use -c to prevent errors showing on cli.