コンテナ外のホストからPostgreSQLのコンテナのバックアップとしてpg_dumpしてたカスタムのアーカイブファイルをpg_restoreしようとしたら [custom archiver] could not read from input file: end of file
となってリストアできなかった。
$ docker exec db_1 pg_restore -Fc -c -d db -U user latest.dump
pg_restore: [custom archiver] could not read from input file: end of file
PostgreSQLのコンテナ(db_1)にbashで入って
$ docker exec -it db_1 bash
コンテナ内でpg_restore実行したら成功した
$ pg_restore -Fc -c -d db -U user latest.dump